mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-28 16:35:46 +01:00
Make :sty* commands more site-aware, more sensibly sorted.
This commit is contained in:
@@ -1162,6 +1162,30 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
||||
}
|
||||
},
|
||||
|
||||
visibleHosts: function (win) {
|
||||
let res = [], seen = {};
|
||||
(function rec(frame) {
|
||||
try {
|
||||
res = res.concat(util.subdomains(frame.location.host));
|
||||
}
|
||||
catch (e) {}
|
||||
Array.forEach(frame.frames, rec);
|
||||
})(win);
|
||||
return res.filter(function (h) !set.add(seen, h));
|
||||
},
|
||||
|
||||
visibleURIs: function (win) {
|
||||
let res = [], seen = {};
|
||||
(function rec(frame) {
|
||||
try {
|
||||
res = res.concat(util.newURI(frame.location.href));
|
||||
}
|
||||
catch (e) {}
|
||||
Array.forEach(frame.frames, rec);
|
||||
})(win);
|
||||
return res.filter(function (h) !set.add(seen, h.spec));
|
||||
},
|
||||
|
||||
/**
|
||||
* Converts an E4X XML literal to a DOM node. Any attribute named
|
||||
* highlight is present, it is transformed into dactyl:highlight,
|
||||
|
||||
Reference in New Issue
Block a user