Autodarts Caller

Another Autodarts-Caller

当前为 2024-06-29 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Autodarts Caller
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.5.3
  5. // @description Another Autodarts-Caller
  6. // @author benebelter
  7. // @match https://play.autodarts.io/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=autodarts.io
  9. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
  10. // @license MIT
  11. // @grant GM.getValue
  12. // @grant GM.setValue
  13. // @grant GM_xmlhttpRequest
  14. // @require https://update.greasyfork.org/scripts/445697/1244619/Greasy%20Fork%20API.js
  15. // ==/UserScript==
  16.  
  17. (function() {
  18. 'use strict';
  19. //////////////// CONFIG ////////////////////
  20.  
  21. var triplesound = 0; // 0=off / 1=simple beep on / 2=Löwen-sound (Soft-tip) on => triple_sound if hitting a triple
  22. var boosound = 0; // 0=off / 1=on => crowd-boo if hitting a miss
  23. var server = 'http://autodarts.x10.mx/'; // Server
  24. var caller = ''; // caller: "russ_bray", "google" (select language in next line)
  25. var language = 'en';
  26. var update = '';
  27.  
  28. //////////////// CONFIG ////////////////////
  29. function soundGo(file, audio){
  30. if (audio === 1){
  31. console.log('play sound-file : '+ file);
  32. const audio = new Audio(file);
  33. audio.play();}
  34. }
  35.  
  36. function getDarts(){
  37. var runde = $('.css-jmdw5n').text().substring(1).split("/");
  38. var numItems = $('.ad-ext-turn-throw').length ;
  39. var dartsgesamt = (runde[0]*3-3)+numItems;
  40. // return "<span style='font-size:0.5em;'>"+dartsgesamt+" Darts</span>" ;
  41. console.log('Ausgabe Anzahl Darts: '+dartsgesamt);
  42. }
  43.  
  44. function random_boo() {
  45. var boos = ["test","values","go","here"],
  46. boosToUse = boos[Math.floor(Math.random() * boos.length)];
  47. // do something with the selected value
  48. alert(boosToUse);
  49. }
  50.  
  51.  
  52. $(document).ready(function(){
  53.  
  54. // Check script for update
  55. (async () => {
  56. update = await GM.getValue('update');
  57. if( (Date.now() - 86400000) > update ) {
  58. var myVersion = GM_info.script.version;
  59. GreasyFork.getScriptHistory('487034').then(data => {
  60. var lastVersion = JSON.stringify( data[0]['version']).replace(/^["'](.+(?=["']$))["']$/, '$1');
  61.  
  62. console.log ('Current Version: ', myVersion, myVersion === lastVersion);
  63. if(myVersion != lastVersion) {
  64. var url = "https://update.greasyfork.org/scripts/487034/Autodarts_Caller.user.js";
  65. var tk = "There is a newer version of the script Autodarts-Caller! Get the update from version " +myVersion+ " -> "+lastVersion;
  66. if (confirm(tk)) {
  67. window.location.replace("https://greasyfork.org/de/scripts/487034-autodarts-caller");
  68. }
  69. else {
  70. // Speichern
  71. (async () => {
  72. await GM.setValue('update', Date.now() );
  73. })();
  74. }
  75. return false;
  76. }
  77.  
  78. })
  79. }
  80. else{
  81. console.log('Update wird erneut in '+ (86400000 - (Date.now()-update)) + ' erinnert!');
  82. }
  83. })();// asyn-end
  84. // Update end//
  85.  
  86.  
  87.  
  88. var t1 = 0; var t2 = 0; var t3 = 0;
  89. var m1 = 0; var m2 = 0; var m3 = 0;
  90. var dotmp3 = '.mp3';
  91. var called = 0 ;
  92. var gameshot_status = 0;
  93. var busted = 0;
  94. var audio = 1;
  95. var firstgameoncall = 0;
  96. var score_is_edited = 0;
  97.  
  98. $(document).on('change', '#caller', function(){
  99.  
  100. caller = $("#caller").find(":selected").val();
  101.  
  102. console.log('Neuer Caller gewählt: '+caller);
  103. // Speichern
  104. (async () => {
  105. await GM.setValue('caller', caller);
  106.  
  107. })();
  108.  
  109.  
  110. if(caller == 'russ_bray') {
  111. server = 'http://autodarts.x10.mx/';
  112. caller = 'russ_bray';
  113. dotmp3 = '.mp3';
  114. $("#caller option[value='russ_bray']").prop('selected', true);
  115. console.log('rb aktiv');
  116. }
  117. if(caller == 'georgeno') {
  118. server = 'http://autodarts.x10.mx/';
  119. caller = 'georgeno';
  120. dotmp3 = '.mp3';
  121. $("#caller option[value='georgeno']").prop('selected', true);
  122. console.log('georgeno aktiv');
  123. }
  124. else if(caller == 'shorty') {
  125. server = 'http://autodarts.x10.mx/';
  126. caller = 'shorty';
  127. dotmp3 = '.mp3';
  128. $("#caller option[value='shorty']").prop('selected', true);
  129. console.log('shorty aktiv');
  130. }
  131.  
  132. else if(caller == 'haulpinks') {
  133. server = 'http://autodarts.x10.mx/';
  134. caller = 'haulpinks';
  135. dotmp3 = '.mp3';
  136. $("#caller option[value='haulpinks']").prop('selected', true);
  137. console.log('haulpinks aktiv');
  138. }
  139.  
  140. else if(caller == 'phil') {
  141. server = 'http://autodarts.x10.mx/';
  142. caller = 'lidarts';
  143. dotmp3 = '.mp3';
  144. $("#caller option[value='phil']").prop('selected', true);
  145. console.log('phil aktiv');
  146. }
  147.  
  148.  
  149. else if(caller == 'bayrisch') {
  150. server = 'http://autodarts.x10.mx/';
  151. caller = 'bayrisch';
  152. dotmp3 = '.mp3';
  153. $("#caller option[value='bayrisch']").prop('selected', true);
  154. console.log('bayrisch aktiv');
  155. }
  156.  
  157. else if(caller == '1_male_eng') {
  158. server = 'http://autodarts.x10.mx/';
  159. caller = '1_male_eng';
  160. dotmp3 = '.mp3';
  161. $("#caller option[value='1_male_eng']").prop('selected', true);
  162. console.log('1_male_eng aktiv');
  163.  
  164. }
  165.  
  166. else if(caller == 'google_eng') {
  167. dotmp3 = '';
  168. language = 'en';
  169. // server = 'http://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl='+language+'&q=';
  170. server = 'https://autodarts.x10.mx/mp3_helper.php?language='+language+'&text=';
  171. caller = '';
  172. $("#caller option[value='google_eng']").prop('selected', true);
  173. console.log('eng aktiv');
  174.  
  175. }
  176.  
  177. else if(caller == 'google_de') {
  178. dotmp3 = '';
  179. language = 'de';
  180. //server = 'https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl='+language+'&q=';
  181. server = 'https://autodarts.de.cool/mp3_helper.php?language='+language+'&text=';
  182. $("#caller option[value='google_de']").prop('selected', true);
  183. caller = '';
  184. }
  185.  
  186. else if(caller == 'google_fr') {
  187. dotmp3 = '';
  188. language = 'fr';
  189. server = 'https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl='+language+'&q=';
  190. server = 'https://autodarts.de.cool/mp3_helper.php?language='+language+'&text=';
  191. caller = '';
  192. $("#caller option[value='google_fr']").prop('selected', true);
  193. }
  194.  
  195. // neuen Caller einmal sprechen lassen
  196.  
  197. soundGo(server+caller+'/game on'+dotmp3, audio); // Wert in Audio-Funktion übergeben
  198.  
  199. })
  200.  
  201.  
  202. setInterval(function() {
  203.  
  204. // If class exist (Header) -> init
  205. // if($(".css-gmuwbf").length ) {
  206. if($(".css-1eveppl").length ) { // neu
  207.  
  208. // // // // // // // // // // read + set last settings // // // // // // // //
  209. (async () => {
  210.  
  211. triplesound = await GM.getValue('triplesound');
  212. caller = await GM.getValue('caller');
  213. boosound = await GM.getValue('boosound');
  214.  
  215. $("#triplesound option[value='"+triplesound+"']").prop('selected', true);
  216. $("#boosound option[value='"+boosound+"']").prop('selected', true);
  217. $("#caller option[value='"+caller+"']").prop('selected', true);
  218. })();
  219.  
  220. if (typeof triplesound == 'undefined'){
  221. triplesound = '0';
  222.  
  223. }
  224.  
  225. if (typeof caller == 'undefined'){
  226. caller = 'x';
  227. }
  228.  
  229. if (typeof boosound == 'undefined'){
  230. boosound = '0';
  231. }
  232.  
  233.  
  234. // // // // // // // // // // // // // // // // // //
  235.  
  236. var x = $(".css-1tq00ko").text();
  237.  
  238. //var x0 = $(".css-1tq00ko:eq(0)").text(); // Scrore-Feld
  239. var x0 = $(".ad-ext-turn-points").text(); // Scrore-Feld neu
  240.  
  241. //$(".ad-ext-turn-points").css ('border', '1px solid red');
  242. //$(".css-1p5spmi:eq(2)").css ('border', '2px solid red');
  243.  
  244. var x1 = $(".ad-ext-turn-throw:eq(0)").text(); // 1. Dart
  245. console.log(x1);
  246. var x2 = $(".ad-ext-turn-throw:eq(1)").text(); // 2. Dart
  247. var x3 = $(".ad-ext-turn-throw:eq(2)").text(); // 3. Dart
  248.  
  249. var gameshot1 = $(".ad-ext-player-score").eq(0).text(); // Spieler 1
  250. var gameshot2 = $(".ad-ext-player-score").eq(1).text(); // Spieler 2
  251. var gameshot3 = $(".ad-ext-player-score").eq(2).text(); // Spieler 3
  252. var gameshot4 = $(".ad-ext-player-score").eq(3).text(); // Spieler 4
  253. var gameshot5 = $(".ad-ext-player-score").eq(4).text(); // Spieler 5
  254. var gameshot6 = $(".ad-ext-player-score").eq(5).text(); // Spieler 6
  255.  
  256.  
  257. //// Bust-Ausgabe ////
  258. if (x0 == 'BUST' && busted == 0) {
  259. soundGo(server+caller+"/0"+dotmp3, audio);
  260. console.log(server+caller+"/0"+dotmp3);
  261. busted = 1;
  262. }
  263.  
  264. //// Gameshot-Ausgabe ////
  265.  
  266. // Gameshot aktivieren
  267. $("button:contains('Undo'),button:contains('Next Leg'),button:contains('Finish'),button:contains('Start')").on( "click", function() {
  268. gameshot_status = 0;
  269.  
  270. })
  271. /// Gameshot ///
  272. if ( gameshot_status != 1
  273. && caller != 'x'
  274. && (gameshot1 == "0" || gameshot2 == "0" || gameshot3 == "0"|| gameshot4 == "0"|| gameshot5 == "0"|| gameshot6 == "0") ){
  275. gameshot_status = 1;
  276.  
  277. if( $("button:contains('Finish')").length ){
  278. soundGo(server+caller+"/gameshot and the match"+dotmp3, audio);
  279. soundGo(server+"/chase_the_sun/chase_the_sun.mp3", audio);
  280.  
  281. }
  282. else {
  283. soundGo(server+caller+"/gameshot"+dotmp3, audio);
  284. }
  285.  
  286. if (gameshot1 == "0") {
  287. $(".ad-ext-player-score").eq(0).html(getDarts()); }
  288. if (gameshot2 == "0") {
  289. $(".ad-ext-player-score").eq(1).html(getDarts()); }
  290. if (gameshot3 == "0") {
  291. $(".ad-ext-player-score").eq(2).html(getDarts()); }
  292. if (gameshot4 == "0") {
  293. $(".ad-ext-player-score").eq(3).html(getDarts()); }
  294. if (gameshot5 == "0") {
  295. $(".ad-ext-player-score").eq(4).html(getDarts()); }
  296. if (gameshot6 == "0") {
  297. $(".ad-ext-player-score").eq(5).html(getDarts()); }
  298. }
  299. //// END Gameshot ////
  300.  
  301.  
  302.  
  303.  
  304. ///////////////////////////////////////////////// TRIPLE Beep ///////////////////////////
  305. if(triplesound == 1){
  306.  
  307. // Triple 1st dart
  308. if (x1.includes("T") && t1 === 0 && $(".ad-ext-turn-throw:eq(0)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  309. t1 = 1;
  310. soundGo( "https://autodarts.x10.mx/triple/triple_beep.mp3", audio);
  311.  
  312. }
  313. // Triple 2st dart
  314. else if(x2.includes("T") && t2 === 0 && $(".css-1p5spmi:eq(1)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  315. t2 = 1;
  316. soundGo( "https://autodarts.x10.mx/triple/triple_beep.mp3", audio);
  317. }
  318. // Triple 3rd dart
  319. else if(x3.includes("T") && t3 === 0 && $(".css-1p5spmi:eq(2)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  320. t3 = 1;
  321. soundGo( "https://autodarts.x10.mx/triple/triple_beep.mp3", audio);
  322. }
  323. }
  324. ///////////////////////////////////////////////// END TRIPLE CALLER ///////////////////////////
  325.  
  326. ///////////////////////////////////////////////// TRIPLE CALLER E-Dart Löwen///////////////////////////
  327. if(triplesound == 2) {
  328. // Triple 20 1st dart
  329. if ( x1.includes("T20") && t1 === 0 && $(".css-1p5spmi:eq(0)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  330. t1 = 1;
  331. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple20_old.wav", audio);
  332. }
  333. // Triple 19 1st dart
  334. else if ( x1.includes("T19") && t1 === 0 && $(".css-1p5spmi:eq(0)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  335. t1 = 1;
  336. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple19_old.wav", audio);
  337. }
  338. // Triple 18 1st dart
  339. else if ( x1.includes("T18") && t1 === 0 && $(".css-1p5spmi:eq(0)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  340. t1 = 1;
  341. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple18_old.wav", audio);
  342. }
  343. // Triple 17 1st dart
  344. if ( x1.includes("T17") && t1 === 0 && $(".css-1p5spmi:eq(0)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  345. t1 = 1;
  346. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple17_old.wav", audio);
  347. }
  348. // Bullseye 1st dart
  349. if ( x1.includes("BULL") && t1 === 0 && $(".css-1p5spmi:eq(0)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  350. t1 = 1;
  351. soundGo("https://autodarts.x10.mx/triple/bullseye.mp3", audio);
  352. }
  353.  
  354. /// 2. Dart
  355. // Triple 20 1st dart
  356. if ( x2.includes("T20") && t2 === 0 && $(".css-1p5spmi:eq(1)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  357. t2 = 1;
  358. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple20_old.wav", audio);
  359. }
  360. // Triple 19 1st dart
  361. else if ( x2.includes("T19") && t2 === 0 && $(".css-1p5spmi:eq(1)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  362. t2 = 1;
  363. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple19_old.wav", audio);
  364. }
  365. // Triple 18 1st dart
  366. else if ( x2.includes("T18") && t2 === 0 && $(".css-1p5spmi:eq(1)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  367. t2 = 1;
  368. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple18_old.wav", audio);
  369. }
  370. // Triple 17 1st dart
  371. if ( x2.includes("T17") && t2 === 0 && $(".css-1p5spmi:eq(1)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  372. t2 = 1;
  373. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple17_old.wav", audio);
  374. }
  375. // Bullseye 2nd dart
  376. if ( x2.includes("BULL") && t2 === 0 && $(".css-1p5spmi:eq(1)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  377. t2 = 1;
  378. soundGo("https://autodarts.x10.mx/triple/bullseye.mp3", audio);
  379. }
  380.  
  381.  
  382. /// 3. Dart
  383. // Triple 20 1st dart
  384. if ( x3.includes("T20") && t3 === 0 && $(".css-1p5spmi:eq(2)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  385. t3 = 1;
  386. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple20_old.wav", audio);
  387. }
  388. // Triple 19 1st dart
  389. else if ( x3.includes("T19") && t3 === 0 && $(".css-1p5spmi:eq(2)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  390. t3 = 1;
  391. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple19_old.wav", audio);
  392. }
  393. // Triple 18 1st dart
  394. else if ( x3.includes("T18") && t3 === 0 && $(".css-1p5spmi:eq(2)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  395. t3 = 1;
  396. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple18_old.wav", audio);
  397. }
  398. // Triple 17 1st dart
  399. else if ( x3.includes("T17") && t3 === 0 && $(".css-1p5spmi:eq(2)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  400. t3 = 1;
  401. soundGo("https://autodarts.x10.mx/triple/SoundHwTriple17_old.wav", audio);
  402. }
  403. // Bullseye 3rd dart
  404. if ( x3.includes("BULL") && t3 === 0 && $(".css-1p5spmi:eq(2)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0){
  405. t3 = 1;
  406. soundGo("https://autodarts.x10.mx/triple/bullseye.mp3", audio);
  407. }
  408.  
  409.  
  410. }
  411.  
  412.  
  413. ///////////////////////////////////////////////// Miss CALLER ///////////////////////////
  414. if(boosound == 1){
  415. //console.log( 'Miss 1: '+$(".css-qy5j7n:eq(0)").closest('div').attr('class') );
  416. //console.log( 'x1: '+ x1 );
  417. //console.log('m1: ' +m1 );
  418. //console.log( 'called: '+ called );
  419. // miss 1st dart
  420.  
  421. if ( x1.includes("M") && m1 === 0 && $(".css-1p5spmi:eq(0)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0)
  422.  
  423. { m1 = 1;
  424. soundGo("https://autodarts.x10.mx/russ_bray/miss_1st_dart.mp3", audio);
  425. }
  426. // miss 2st dart
  427. else if ( x2.includes("M") && m2 === 0 && $(".css-1p5spmi:eq(1)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi' && called == 0)
  428. { m2 = 1;
  429. soundGo("https://autodarts.x10.mx/russ_bray/miss_2nd_dart.mp3", audio);
  430. }
  431.  
  432. // miss 3rd dart
  433. else if ( x3.includes("M") && m3 === 0 && $(".css-1p5spmi:eq(2)").closest('div').attr('class') == 'ad-ext-turn-throw css-1fzu0fr' && called == 0)
  434. { m3 = 1;
  435. soundGo("https://autodarts.x10.mx/russ_bray/miss_3rd_dart.mp3", audio);
  436. }
  437. }
  438.  
  439. // Caller reset
  440. if( (x1 == '' || $(".css-1p5spmi:eq(2)").closest('div').attr('class') != 'ad-ext-turn-throw css-1p5spmi') && called == 1) {
  441. called = 0; busted = 0;
  442. console.log('Caller resetet');
  443. }
  444.  
  445.  
  446. // Korrektur nach Klick auf Ok -> Score auslesen und Caller erneut aktivieren (called=0)
  447. $("button:contains('Ok')").on( "click", function() {
  448. called = 1;
  449. setTimeout(function (){
  450. var x0 = $(".css-1tq00ko:eq(0)").text(); // read new score with delay(wait for AD-Response)
  451. score_is_edited = 1;
  452. }, 500);
  453. // soundGo(server+caller+'/'+x0+dotmp3, audio); // Wert in Audio-Funktion übergeben
  454.  
  455.  
  456. });
  457.  
  458. // Caller if 3rd Dart has a score(class) and called == 0
  459. if( ($(".css-1p5spmi:eq(2)").closest('div').attr('class') == 'ad-ext-turn-throw css-1p5spmi'
  460. && called == 0
  461. && caller != 'x')
  462. || score_is_edited == 1 ) {
  463. called = 1;
  464. score_is_edited = 0;
  465. console.log('Score: '+x0 );
  466. soundGo(server+caller+'/'+x0+dotmp3, audio); // Wert in Audio-Funktion übergeben
  467. t1 = 0; t2 = 0; t3 = 0; // reset/enable triple-sound
  468. m1 = 0; m2 = 0; m3 = 0; // reset/enable miss-sound
  469. }
  470.  
  471.  
  472. // Sound-Option-Selects einfügen wenn noch nicht existiert
  473. if($("#caller").length == 0) {
  474.  
  475. $(".css-l32vgy").after('<select id="caller" name="caller" class="css-l32vgy" style="padding:5px 5px 5px 5px;"><option selected disabled style="background-color: #353d47">Caller</option><option value="x" style="background-color: #353d47">OFF</option><option value="1_male_eng" style="background-color: #353d47">Male eng</option><option value="russ_bray" style="background-color: #353d47">Russ B</option><option value="phil" style="background-color: #353d47">Phil</option><option value="georgeno" style="background-color: #353d47">George N</option><option value="shorty" style="background-color: #353d47">Shorty eng</option><option value="haulpinks" style="background-color: #353d47">Caller Paul eng</option><option value="bayrisch" style="background-color: #353d47">Bavarian male</option></select><select id="triplesound" name="triplesound" class="css-l32vgy" style="padding:5px;"><option selected disabled style="background-color: #353d47">Triple-Sound</option><option value="0" style="background-color: #353d47">OFF</option><option value="1" style="background-color: #353d47">Beep on</option><option value="2" style="background-color: #353d47">Löwen (Softtip)</option></select><select id="boosound" name="boosound" class="css-l32vgy" style="padding:5px;"><option selected disabled style="background-color: #353d47">Boo-Sound</option><option value="1" style="background-color: #353d47">Boo ON</option><option value="0" style="background-color: #353d47">Boo OFF</option></select>');
  476.  
  477. ////// Triple-Select ehem css-1tw9fat
  478. // $(".css-l32vgy").after('<select id="triplesound" name="triplesound" class="css-l32vgy" style="padding:5px;"><option selected disabled style="background-color: #353d47">Triple-Sound</option><option value="0" style="background-color: #353d47">OFF</option><option value="1" style="background-color: #353d47">Beep on</option><option value="2" style="background-color: #353d47">Löwen (Softtip)</option></select><select id="boosound" name="boosound" class="css-l32vgy" style="padding:5px;"><option selected disabled style="background-color: #353d47">Boo-Sound</option><option value="1" style="background-color: #353d47">Boo ON</option><option value="0" style="background-color: #353d47">Boo OFF</option></select>');
  479.  
  480.  
  481.  
  482.  
  483. $(document).on('change', '#triplesound', function(){
  484. triplesound = $("#triplesound").find(":selected").val();
  485.  
  486. // save triple-settings
  487. (async () => {
  488. await GM.setValue('triplesound', triplesound);
  489. })();
  490.  
  491. })
  492.  
  493. // Boo-Select
  494. // $(".css-l32vgy").append('<select id="boosound" name="boosound" class="css-l32vgy" style="padding:5px;"><option selected disabled style="background-color: #353d47">Boo-Sound</option><option value="1" style="background-color: #353d47">Boo ON</option><option value="0" style="background-color: #353d47">Boo OFF</option></select>');
  495.  
  496. $(document).on('change', '#boosound', function(){
  497. boosound = $("#boosound").find(":selected").val();
  498. // save boo-settings
  499. (async () => {
  500. await GM.setValue('boosound', boosound);
  501. })();
  502. })
  503.  
  504. } // end add dropdowns
  505.  
  506. }
  507. }, 200);
  508.  
  509. });
  510.  
  511. })();