User:Technical 13/Scripts/Gadget-codeAnchors

Browser/skin compatibility table
Browser\Skin Vector MonoBook Modern Cologne Blue
Chrome 29 untested untested untested untested
FireFox 26 Works untested untested untested
IE 7 untested untested untested untested
Opera 12.16 untested untested untested untested
Opera 16 untested untested untested untested
Safari 5 untested untested untested untested
Code Anchors
Author(s)Technical 13
StatusStable
UpdatedFebruary 2, 2014
    (10 years ago)
BrowsersFirefox 26
SkinsVector
SourceUser: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 %).

[[?title=User_talk:Technical_13/Scripts/Gadget-codeAnchors&action=edit&section=new&preloadtitle=Bug+Report+%7B%7Bsubst%3A%23time%3Ad+M+Y%7Cnow%7D%7D Report a bug |?title=User_talk:Technical_13/Scripts/Gadget-codeAnchors&action=edit&section=new&preloadtitle=Bug+Report+%7B%7Bsubst%3A%23time%3Ad+M+Y%7Cnow%7D%7D Report a bug]] [[?title=User_talk:Technical_13/Scripts/Gadget-codeAnchors&action=edit&section=new&preloadtitle=Feature+Request+%7B%7Bsubst%3A%23time%3Ad+M+Y%7Cnow%7D%7D Request a feature |?title=User_talk:Technical_13/Scripts/Gadget-codeAnchors&action=edit&section=new&preloadtitle=Feature+Request+%7B%7Bsubst%3A%23time%3Ad+M+Y%7Cnow%7D%7D Request a feature]]

Using this script

edit

On the English Wikipedia

edit

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

edit

Once you have saved the above to your skin.js or common.js, you will have to WP:BYPASS your cache to see the effects.