Welcome login | signup
Language en es fr
OccupyForum

Forum Post: A Script to Fix The Site's Broken Links

Posted 11 months ago on May 22, 2013, 3:36 p.m. EST by wittlelittlecloud (-83)
This content is user submitted and not an official statement

The site's top links were broken today. A site administrator has modified the base URL with unfortunate consequences. The icons on the right are also broken.

I wrote a simple fix using jQuery. It fixes all the top links, but the icons remain broken. I didn't care for the icons, so I didn't look into it. Most likely an administrator will fix this problem soon enough, but, in the meantime, if the broken links annoy you just use my script.

I tested it in Chrome, but it should work in FireFox using GreaseMonkey. I use TamperMonkey in Chrome.

To install on Chrome:

  1. Open Chrome and go to https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en and install TamperMonkey. TamperMonkey is a Chrome extension which permits you to manage scripts.

  2. If the installation was successful, you should see a new icon for TamperMonkey somewhere at the top of your toolbar. I have it on the far right, just after the space to enter URLs.

  3. Click the icon then choose "Add a new script"

  4. This should open a window with a basic script header. You can delete that and replace it with the following script I made.

// ==UserScript==
// @name occupywallst.org broken link fixer
// @namespace none
// @version 0.1
// @description Fixes broken links on occupywallst.org
// @match http://occupywallst.org/*
// @copyright none
// ==/UserScript==

$(document).ready(function() {
$('a').each(function() {
this.href = this.href.replace('http://occupywallst.org/web/20130202050845/', '');
});
});

  1. Click save. Now you can go in the manager and activate the script. This script will only run on occupywallst.org as specified by the @match attribute.

This will slow down the site a tiny bit since the script will run on each page load, so it's a type of hack, but it's the only possible solution until the administrators fix the problem on the server.

If you want to use the script and are having problems, please let me know in the comments and I'll try to help. I only tested it on my setup, so it might have issues on other setups. We'll see.

1 Comments

1 Comments


Read the Rules
[-] 1 points by MattLHolck (16833) from San Diego, CA 11 months ago

seems the internet changes the interface language to stay employed sometimes

I'm bitter most of my old programs no longer work