1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-17 03:15:45 +01:00

Refactor the Styles API and implimentation slightly. Move deprecated() to base.jsm.

This commit is contained in:
Kris Maglione
2010-12-22 03:22:23 -05:00
parent d429af17aa
commit 9b8ea86c09
10 changed files with 152 additions and 137 deletions

View File

@@ -249,20 +249,12 @@ const Template = Module("Template", {
sourceLink: function (frame) {
let url = (frame.filename || "unknown").replace(/.* -> /, "");
function getPath(url) {
try {
return util.getFile(url).path;
}
catch (e) {
return url;
}
}
XML.ignoreWhitespace = false; XML.prettyPrinting = false;
return <a xmlns:dactyl={NS} dactyl:command="buffer.viewSource"
href={url} line={frame.lineNumber}
highlight="URL">{
getPath(url) + ":" + frame.lineNumber
util.urlPath(url) + ":" + frame.lineNumber
}</a>
},