User:Technical 13/Scripts/Gadget-codeAnchors: Difference between revisions

Content deleted Content added
Technical 13 (talk | contribs)
Create starting point for doc.
 
Technical 13 (talk | contribs)
update
 
(4 intermediate revisions by the same user not shown)
Line 44:
| name = Code Anchors
| author = [[User:Technical 13|Technical 13]]
| updatedstatus = January 20, 2014Stable
| sourcemainsource = [[User:Technical 13/SandBox/Gadget-codeAnchors.js]]
| status = Beta
| skins = [[WP:Vector|Vector]]
| source = [[User:Technical 13/SandBox/Gadget-codeAnchors.js]]
| skins = [[WP:Vector|Vector]]<!--, [[WP:MonoBook|MonoBook]], [[WP:Modern|Modern]], [[WP:Cologne Blue|Cologne Blue]] -->
| browsers = Firefox 26
| install-target = [[Special:MyPage/skin.js|skin.js]] or [[Special:MyPage/common.js|common.js]]
Line 55 ⟶ 54:
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 '''%''').
 
<center>{{Center|1={{Clickable button|{{Plainlinks|1=//en.wikipedia.org/w/index.php?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|2=Report a bug}}}} {{Clickable button|{{Plainlinks|1=//en.wikipedia.org/w/index.php?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|2=Request a feature}}}}</center>}}
{{-}}
 
Line 62 ⟶ 61:
This script can be imported to [[Special:MyPage/skin.js|skin.js]] or [[Special:MyPage/common.js|common.js]] by adding:
<syntaxhighlight lang="javascript">
importScript( 'User:Technical 13/SandBoxScripts/Gadget-codeAnchors.js' );// [[User:Technical 13/SandBoxScripts/Gadget-codeAnchors]]
</syntaxhighlight>
 
=== Step two ===
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.
 
{{User:Technical 13/Scripts/Nav}}