Last active
December 28, 2018 21:32
-
-
Save 999gary/c3c8cf4e165f498a794640dd920f6677 to your computer and use it in GitHub Desktop.
GET/SET for Stick Ranger 2
This file contains 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
// ==UserScript== | |
// @name SR2 GET/SET script | |
// @version 1 | |
// @grant none | |
// @include http://dan-ball.jp/en/javagame/ranger2/ | |
// @include https://dan-ball.jp/en/javagame/ranger2/ | |
// ==/UserScript== | |
var h = document.getElementById("facebook"); | |
h.innerHTML+="<textarea id='bun' rows='1' cols='34' onclick='this.select();'></textarea>"; | |
h.innerHTML+="<button onclick='savesr2();'>GET</button>"; | |
h.innerHTML+="<button onclick='loadsr2();'>SET</button>"; | |
window.eval('var savesr2=function(){if(window.localStorage.getItem("ranger2")){document.getElementById("bun").value = window.localStorage.getItem("ranger2")}}'); | |
window.eval('var loadsr2=function(){window.localStorage.setItem("ranger2", document.getElementById("bun").value); location.reload();}'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment