Back-to-AD-Button on Autodarts Board-Manager

Adding a button in the board manager back to Autodarts. Recommended for touchscreens in full screen mode

Ajankohdalta 24.3.2024. Katso uusin versio.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Back-to-AD-Button on Autodarts Board-Manager
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Adding a button in the board manager back to Autodarts. Recommended for touchscreens in full screen mode
// @author       benebelter
// @include      *://*.*.*.*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=autodarts.io
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// @run-at       document-end
// @license      MIT 
// ==/UserScript==

(function() {
    'use strict';

    var elementExist = setInterval( () => {
        var elm = $(".css-1nlwyv4").length;
        if (  $(".css-1nlwyv4").length != 0) {

            $('.css-1nlwyv4:first-child').before('<div><a class="chakra-button css-1nlwyv4" href="https://play.autodarts.io">Back to Autodarts</a></div>');

            clearInterval(elementExist);
            console.log('erledigt');
            console.log('Länge : '+ $(".css-1nlwyv4").length );
        }
    }, 100);

})();