mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 20:15:47 +01:00
Network state nonsense.
This commit is contained in:
@@ -106,10 +106,10 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase),
|
|||||||
onStateChange: util.wrapCallback(function onStateChange(webProgress, request, flags, status) {
|
onStateChange: util.wrapCallback(function onStateChange(webProgress, request, flags, status) {
|
||||||
const L = Ci.nsIWebProgressListener;
|
const L = Ci.nsIWebProgressListener;
|
||||||
|
|
||||||
if (flags & (L.STATE_IS_DOCUMENT | L.STATE_IS_WINDOW)) {
|
if (request)
|
||||||
if (request)
|
dactyl.applyTriggerObserver("browser.stateChange", arguments);
|
||||||
dactyl.applyTriggerObserver("browser.stateChange", arguments);
|
|
||||||
|
|
||||||
|
if (flags & (L.STATE_IS_DOCUMENT | L.STATE_IS_WINDOW)) {
|
||||||
// This fires when the load event is initiated
|
// This fires when the load event is initiated
|
||||||
// only thrown for the current tab, not when another tab changes
|
// only thrown for the current tab, not when another tab changes
|
||||||
if (flags & L.STATE_START) {
|
if (flags & L.STATE_START) {
|
||||||
|
|||||||
@@ -140,12 +140,16 @@ var StatusLine = Module("statusline", {
|
|||||||
webProgress.DOMWindow.document.dactylSecurity = this.security;
|
webProgress.DOMWindow.document.dactylSecurity = this.security;
|
||||||
},
|
},
|
||||||
"browser.stateChange": function onStateChange(webProgress, request, flags, status) {
|
"browser.stateChange": function onStateChange(webProgress, request, flags, status) {
|
||||||
if (flags & Ci.nsIWebProgressListener.STATE_START)
|
const L = Ci.nsIWebProgressListener;
|
||||||
this.progress = 0;
|
|
||||||
if (flags & Ci.nsIWebProgressListener.STATE_STOP) {
|
if (flags & (L.STATE_IS_DOCUMENT | L.STATE_IS_WINDOW))
|
||||||
this.progress = "";
|
if (flags & L.STATE_START)
|
||||||
|
this.progress = 0;
|
||||||
|
else if (flags & L.STATE_STOP)
|
||||||
|
this.progress = "";
|
||||||
|
|
||||||
|
if (flags & L.STATE_STOP)
|
||||||
this.updateStatus();
|
this.updateStatus();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"browser.statusChange": function onStatusChange(webProgress, request, status, message) {
|
"browser.statusChange": function onStatusChange(webProgress, request, status, message) {
|
||||||
this.timeout(function () {
|
this.timeout(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user