Jimmie1717 icon

UserScript: BingoSync Popouts

Jimmie1717 | PRO | 05/11/25 09:22:28 PM UTC (Edited) | 0 ⭐ | 1255 👁️ | Never ⏰ | []
JavaScript |

1.24 KB

|

None

|

0 👍

/

0 👎

// ==UserScript==
// @name         BingoSync Popouts
// @namespace    http://jimmie1717.com/
// @version      2025-05-09
// @description  Make popouts clickable and open a separate window with the goals.
// @author       Jimmie1717
// @match        https://bingosync.com/room/*
// @grant        none
// ==/UserScript==
 
(function(){
    'use strict';
 
    ["tlbr","bltr","col1","col2","col3","col4","col5","row1","row2","row3","row4","row5"].forEach((popout,i)=>{
        document.getElementById(popout).addEventListener('click',()=>{
            let elements=document.getElementsByClassName(popout),goals=new Array(elements.length);
            for(var i=0;i<goals.length;i++) goals[i]=elements[i].children[elements[i].children.length-1].textContent.replace(/\s/g,"_").replace(/'/g,"`").replace(/&/g,"and");
            if(popout=="bltr") goals.reverse();
            window.open(`https://bingo.jimmie1717.com/popout?game=mm&name=${document.getElementById(popout).textContent}&goals=${goals.join(';')}&layout=vertical&version=1.1&seed=${document.getElementById('the-seed').textContent.replace(/\s/g,"")}&mode=normal&lang=en`,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=319, height=670");
        },false);
    });
})();

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎