Browse Source

scrollbar script fix

pull/2/head
Ivan Polyakov 3 years ago
parent
commit
afb390dc37
  1. 15
      src/scripts/webapps/scrollbar.js

15
src/scripts/webapps/scrollbar.js

@ -109,9 +109,11 @@
this.thumb.init(); this.thumb.init();
this.track.init(); this.track.init();
}, },
upd(el) { updStyle(el) {
el.style = this.bar.getStyle() + this.thumb.getStyle() el.style = this.bar.getStyle() + this.thumb.getStyle()
+ this.track.getStyle(); + this.track.getStyle();
},
updData() {
this.print(); this.print();
this.updateUrl(); this.updateUrl();
}, },
@ -147,12 +149,6 @@
url = url.replace(/\#/g, "%23"); url = url.replace(/\#/g, "%23");
window.location.href = url; window.location.href = url;
try {
throw "";
history.pushState(null, null, url);
} catch {
window.location.href = url;
}
}, },
showScss() { showScss() {
this.output.style = "display:block;" this.output.style = "display:block;"
@ -174,7 +170,7 @@
settingsForm.init(); settingsForm.init();
updBtn.onclick = settingsForm.upd.bind(settingsForm, textArea); updBtn.onclick = settingsForm.updData.bind(settingsForm);
printBtn.onclick = settingsForm.showScss.bind(settingsForm); printBtn.onclick = settingsForm.showScss.bind(settingsForm);
clearBtn.onclick = settingsForm.hideScss.bind(settingsForm); clearBtn.onclick = settingsForm.hideScss.bind(settingsForm);
@ -198,8 +194,9 @@
} }
} }
}); });
settingsForm.updStyle(textArea);
if (updNeeded) { if (updNeeded) {
settingsForm.upd(textArea); settingsForm.updData();
} }
})(); })();
// @license-end // @license-end

Loading…
Cancel
Save