Skip to content

Instantly share code, notes, and snippets.

@Damovisa
Created July 26, 2017 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Damovisa/a087f8e327ddb91123483ab8dde6981a to your computer and use it in GitHub Desktop.
Save Damovisa/a087f8e327ddb91123483ab8dde6981a to your computer and use it in GitHub Desktop.
Auto-replace /azure-docs edit link with /azure-docs-pr

Raw javascript:

var tmp_editlink = document.getElementById('contenteditbtn').children[0];
tmp_editlink.href = tmp_editlink.href.replace('/azure-docs/','/azure-docs-pr/');

CJS chrome extension:

Install the extension here

  1. Go to a docs page with an edit link
  2. Click the CJS icon
  3. Paste the raw JS above
  4. Click save

Bookmarklet:

javascript:!function(){var e=document.getElementById("contenteditbtn").children[0];e.href=e.href.replace("/azure-docs/","/azure-docs-pr/")}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment