User:Technical 13/Scripts/Gadget-codeAnchors
Appearance
Browser/skin compatibility table
| |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Author(s) | Technical 13 |
---|---|
Status | Beta |
Updated | January 20, 2014 |
Browsers | Firefox 26 |
Skins | Vector |
Source | User:Technical 13/SandBox/Gadget-codeAnchors.js |
This script adds anchors for all single line, non-empty block comments to all .css and .js pages so that you can link to a "section" of a script or stylesheet. All anchors are dot encoded (same this as percent encoded with . instead of %).
Using this script
On the English Wikipedia
This script can be imported to skin.js or common.js by adding:
importScript( 'User:Technical 13/Scripts/Gadget-codeAnchors.js' );// [[User:Technical 13/Scripts/Gadget-codeAnchors]]
Step two
Once you have saved the above to your common.js, you will have to WP:BYPASS your cache to see the effects.