User talk:Rob Linden/GeSHI Test: Difference between revisions
Jump to navigation
Jump to search
New page: There are two things that need to be done. #Remove the LSL_ prefix from the autolinking. That is left over from the dark ages and no new articles use this. None of the constants use this ... |
No edit summary |
||
| Line 2: | Line 2: | ||
#Remove the LSL_ prefix from the autolinking. That is left over from the dark ages and no new articles use this. None of the constants use this so despite there being a page for TRUE, the highlighter doesn't think there is one. | #Remove the LSL_ prefix from the autolinking. That is left over from the dark ages and no new articles use this. None of the constants use this so despite there being a page for TRUE, the highlighter doesn't think there is one. | ||
# | #Add some CSS to hide the underlining. <code>pre.code A{ text-decoration:none; }</code> | ||
--[[User:Strife Onizuka|Strife Onizuka]] | Little GM script I wrote that does both of these. | ||
<javascript>// ==UserScript== | |||
// @name LSL Style | |||
// @namespace http://home.comcast.net/~mailerdaemon/ | |||
// @include https://wiki.secondlife.com/* | |||
// @include http://wiki.secondlife.com/* | |||
// ==/UserScript== | |||
GM_addStyle("pre.code a{ text-decoration:none; }") | |||
var regex = /LSL_/; | |||
var res = document.evaluate("//pre[@class='code']/a", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |||
for (i = 0; link = res.snapshotItem(i); ++i) { | |||
var t = link.attributes.getNamedItem("href"); | |||
t.value = t.value.replace(regex, ""); | |||
}</javascript> | |||
-- [[User:Strife Onizuka|Strife Onizuka]] 05:12, 30 November 2007 (PST) | |||
Revision as of 06:12, 30 November 2007
There are two things that need to be done.
- Remove the LSL_ prefix from the autolinking. That is left over from the dark ages and no new articles use this. None of the constants use this so despite there being a page for TRUE, the highlighter doesn't think there is one.
- Add some CSS to hide the underlining.
pre.code A{ text-decoration:none; }
Little GM script I wrote that does both of these. <javascript>// ==UserScript== // @name LSL Style // @namespace http://home.comcast.net/~mailerdaemon/ // @include https://wiki.secondlife.com/* // @include http://wiki.secondlife.com/* // ==/UserScript==
GM_addStyle("pre.code a{ text-decoration:none; }") var regex = /LSL_/; var res = document.evaluate("//pre[@class='code']/a", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (i = 0; link = res.snapshotItem(i); ++i) { var t = link.attributes.getNamedItem("href"); t.value = t.value.replace(regex, ""); }</javascript> -- Strife Onizuka 05:12, 30 November 2007 (PST)