Browse Source

scrollbar script fix

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

15
src/scripts/webapps/scrollbar.js

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

Loading…
Cancel
Save