summaryrefslogtreecommitdiff
path: root/scripts/obs.js
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-06-16 21:17:10 +0500
committerilotterytea <iltsu@alright.party>2024-06-16 21:17:10 +0500
commit9cf5c78e5ee33e3266d3ac598e7182f413167b94 (patch)
tree3eeed88da97fbeb5843e9552f462203a1faffc9a /scripts/obs.js
parent4d79baa96d3995d7c1a7c98ca9dbc28acf8ae3b7 (diff)
feat: button to acquire a link for obsHEADmaster
Diffstat (limited to 'scripts/obs.js')
-rw-r--r--scripts/obs.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/obs.js b/scripts/obs.js
new file mode 100644
index 0000000..ef18ae8
--- /dev/null
+++ b/scripts/obs.js
@@ -0,0 +1,17 @@
+function get_link_for_obs() {
+ const muted_img = localStorage.getItem("muted_img");
+ const speak_img = localStorage.getItem("speak_img");
+ const silence_db = localStorage.getItem("silence_db");
+
+ if (!muted_img || !speak_img || !silence_db) {
+ alert("settings not set!");
+ return;
+ }
+
+ const url_part = `show.html?silence_db=${silence_db}&muted_img=${muted_img}&speak_img=${speak_img}`;
+
+ navigator.clipboard.writeText(window.location.href + url_part);
+ alert("copied the url to clipboard!");
+
+ window.location.replace(url_part);
+} \ No newline at end of file