cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_Jenkins
Cirrostratus
Cirrostratus

Problem this snippet solves:

With the rollout of the new DevCentral Wiki, a lot of the old questions, answers and comments on DC include links to wiki articles that not longer work.

In order to mitigate this, I've put together a quick Tampermonkey script to help mitigate this.


This Tampermonkey script will search the page once the content loads to find any links to the old Wiki site (https://devcentral.f5.com/wiki*) and will attempt to parse out the pieces in order to rebuild an updated working link to the new API docs (on https://clouddocs.f5.com/api).


How to use this snippet:

  1. You'll need to install Tampermonkey (if it's not already installed)
  2. Create a new userscript and paste the content from the CodeShare link.
  3. If you don't want to to risk the userscript auto updating if the gist gets updated on Github, remove the @updateURL and @downloadURL references in the header*
  4. Save the file, and open up an old Wiki page to test it (test link). Notice the url changes to the new API docs.


As an enhancement to this script, you can add the following after line 8 in the script to include automatic modification of Google search results too:

// @match https://www.google.com/search*


* I will be working on updates to help with links that don't redirect correctly or result in a 404 error.

Tested this on version:

No Version Found
Comments
Eric_Chen
F5 Employee
F5 Employee

Thank you Michael!

Version history
Last update:
‎21-May-2019 18:40
Updated by:
Contributors