-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBlooket Set Tokens (Tower Defense)
1 lines (1 loc) · 3.17 KB
/
Blooket Set Tokens (Tower Defense)
1
javascript:(function() {if(window.location.hostname.includes('blooket.com')) { document.head.insertAdjacentHTML('beforeend',`<style id='dform-styl'> div#dform{background-color:rgba(0,0,0,0.45);width:100vw;height:100vh;margin:0;position:absolute;%20top:0;%20left:0;%20display:grid;%20place-items:center;%20z-index:99999;%20}%20div#dform%20%3E%20button#dclose{%20outline:none;%20color:white;%20text-align:center;%20position:absolute;%20top:0;%20right:0;%20font-size:25px;%20background-color:red;%20padding:10px%2018px;%20transition:all%200.3s;%20border:2px%20solid%20white;%20border-radius:8px;%20}%20div#dform%20%3E%20button#dclose:hover{%20cursor:pointer;%20background-color:tomato;%20}%20div#dform%20%3E%20form%20%3E%20input[type=number]#g-value{%20border-radius:10px;%20width:260px;%20height:55px;%20text-align:center;%20font-size:25px;%20background-color:lightblue;%20transition:all%200.3s;%20border:3px%20solid%20dodgerblue;%20}%20div#dform%20%3E%20form%20%3E%20input[type=number]#g-value:focus{%20outline:none;%20border-radius:10px;%20background-color:powderblue;%20border:3px%20solid%20deepskyblue;%20}%20div#dform%20%3E%20form%20%3E%20input[type=number]#g-value::-webkit-outer-spin-button,%20div#dform%20%3E%20form%20%3E%20input[type=number]#g-value::-webkit-inner-spin-button{%20-webkit-appearance:none;%20margin:0;%20}%20div#dform%20%3E%20form%20%3E%20button[type=submit]#gsub{%20display:inline;%20height:60px;%20width:120px;%20text-align:center;%20border-radius:10px;%20font-size:25px;%20margin-left:8px;%20background-color:lightblue;%20outline:none;%20transition:all%200.3s;%20border:3px%20solid%20dodgerblue;%20}%20div#dform%20%3E%20form%20%3E%20button[type=submit]#gsub:hover{%20cursor:pointer;%20background-color:powderblue;%20}%20%3C/style%3E%60);%20const%20stateNode%20=%20Object.values(document.querySelector('#app%20%3E%20div%20%3E%20div'))[1].children[1]._owner.stateNode;%20const%20oStateNode%20=%20Object.values(document.querySelector('#app%20%3E%20div%20%3E%20div%20%3E%20div:nth-child(3)%20%3E%20div'))[1].children[2]._owner.stateNode;%20const%20state%20=%20stateNode.state;%20document.body.insertAdjacentHTML('afterbegin',%20%60%3Cdiv%20id='dform'%3E%3Cbutton%20id='dclose'%3E%C3%97%3C/button%3E%3Cform%3E%3Cinput%20type='number'%20name='g-value'%20id='g-value'%20placeholder='Enter%20Token%20Amount'%3E%3Cbutton%20type='submit'%20id='gsub'%3EEnter%3C/button%3E%3C/form%3E%3C/div%3E%60);%20document.removeEventListener('keypress',%20oStateNode.onKeyPress);%20document.querySelector('div#dform%20%3E%20button#dclose').onclick%20=%20()%20=%3E%20{%20document.querySelector('div#dform').remove();document.querySelector('style#dform-styl').remove();document.addEventListener('keypress',%20oStateNode.onKeyPress);%20};%20document.querySelector('div#dform%20%3E%20form').onsubmit%20=%20function(e)%20{%20e.preventDefault();%20const%20amount%20=%20parseInt(document.querySelector('div#dform%20%3E%20form%20%3E%20input[type=number]#g-value').value);%20stateNode.setState({tokens:%20amount});%20document.querySelector('div#dform').remove();%20document.querySelector('style#dform-styl').remove();%20document.addEventListener('keypress',%20oStateNode.onKeyPress);%20};%20}%20else%20alert('Please%20use%20this%20on%20Blooket!');%20})();