Last active
June 11, 2020 10:21
-
-
Save ipisboomz/3736ac7ace7f14148dffb4add5455e04 to your computer and use it in GitHub Desktop.
DDTANK Ruler JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Read me How to use | |
| * 1. open ddtank | |
| * 2. right click on any part of the page not the game itself | |
| * 3. click on inspect element menu | |
| * 4. go to console ang copy-paste this code and press enter | |
| * TIPS: You can adjust the number top: 500; value to suit your preference, the height of the game is 600 | |
| * Try this other one: https://gist.github.com/ipisboomz/518d97ba0d75392402b346d32bd0c503 not overlay but appears on the bottom | |
| */ | |
| document.getElementsByTagName("object")[0].parentElement.appendChild((()=>{ | |
| document.getElementsByTagName("object")[0].parentElement.style.position = 'relative'; | |
| const ruller = document.createElement('div'); | |
| ruller.innerHTML = new Array(10).fill('').map((x,i)=>'<div style="border-right: 2px solid #000; flex: 1">'+(i+1)+'</div>').join(''); | |
| ruller.style = "height: 20px; pointer-events: none; width: 100%; top: 500; left: 0; position: absolute;z-index: 1; display: flex; flex-direction: row; border-bottom: 2px solid #000;"; | |
| return ruller; | |
| })()); | |
| document.body.style.backgroundImage = "url(https://user-images.githubusercontent.com/64345475/83216408-b1c6a100-a158-11ea-961f-379674cfbfa7.png)"; | |
| console.log("Ruler Active"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment