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:
@@ -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>
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user