User:Technical 13/Scripts/Gadget-codeAnchors
Appearance
From Wikipedia, the free encyclopedia
Browser/skin compatibility table
| |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Author | Technical 13 |
|---|---|
| Status | Stable |
| Updated | February 2, 2014 (11 years ago) |
| 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 %).
[[?title=User_talk:Technical_13/Scripts/Gadget-codeAnchors&action=edit§ion=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§ion=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§ion=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§ion=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.