]> git.rmz.io Git - dotfiles.git/blobdiff - dwb/userscripts/startup-noautoreload.js
add startup-noautoreload
[dotfiles.git] / dwb / userscripts / startup-noautoreload.js
diff --git a/dwb/userscripts/startup-noautoreload.js b/dwb/userscripts/startup-noautoreload.js
new file mode 100644 (file)
index 0000000..9a837b2
--- /dev/null
@@ -0,0 +1,13 @@
+//!javascript
+
+// Prevents previously-opened tabs from reloading all at once after a restart.
+
+execute("set load-on-focus true");
+
+var sigId = signals.connect("navigation", function(wv) {
+    if (wv == tabs.current)
+    {
+        execute("set load-on-focus false");
+        signals.disconnect(sigId);
+    }
+});
\ No newline at end of file