Remove project OAuth hardcodes
This commit is contained in:
@@ -393,4 +393,22 @@
|
||||
</details>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<script>
|
||||
(() => {
|
||||
const scrollKey = "workers-scroll-y";
|
||||
const restoreY = sessionStorage.getItem(scrollKey);
|
||||
if (restoreY !== null) {
|
||||
sessionStorage.removeItem(scrollKey);
|
||||
requestAnimationFrame(() => window.scrollTo(0, Number(restoreY) || 0));
|
||||
}
|
||||
document.addEventListener("submit", (event) => {
|
||||
const form = event.target;
|
||||
if (!(form instanceof HTMLFormElement)) return;
|
||||
const action = form.getAttribute("action") || "";
|
||||
if (action.startsWith("/workers") || action.startsWith("/settings") || action.includes("-schedule/")) {
|
||||
sessionStorage.setItem(scrollKey, String(window.scrollY));
|
||||
}
|
||||
}, true);
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user