Thread:FunAndGamess/@comment-34158552-20190713203038/@comment-36742973-20190808232946

// *** 変数宣言 *** // var diepHackSystem_version = "1.0.1" var diepHackSystem_years = "2019" var canvas = document.getElementById('canvas'); var ctx = canvas.getContext("2d"); var diepHackMenu = document.createElement('div'); var diepHackConsole = ""; var diepHackCommandError = true; // *** 初期化 *** // document.title = ( '' + document.title + ' - DiepHack' + diepHackSystem_years ); styleInit; jsInit; bodyInit; // *** CSSの初期化 *** // function styleInit { addGlobalStyle(`div::-webkit-scrollbar{width: 24px;} div::-webkit-scrollbar-track{background: #FFFFFFEE; border: none; border-radius: 10px; box-shadow: inset 0 0 2px #00B2E155;}div::-webkit-scrollbar-thumb{background: #00B2E1; border-radius: 10px; box-shadow: none;}`); addGlobalStyle(`.diepHack-menu{position:absolute; top:55px; left:-750px; padding: 0.5em 1em; margin: 2em 0; width: 400px; background: #FFFFFFEE; border: solid 5px #0082A155; border-radius: 14px;                        margin: 10px; padding: 10px; line-height: 1.3; overflow: auto; text-align: left; width: 750px; height: 300px;                         transition-duration: 0.5s;} .diepHack-menu:hover{position:absolute; left:-20px;}`); addGlobalStyle(`.diepHack-pretitle{font-size: 34px;}`); addGlobalStyle(`.diepHack-subtitle{font-size: 19px;}`); addGlobalStyle(`.diepHack-description{font-size: 16px;}`); addGlobalStyle(`.diepHack-warning{font-size: 16px; color:#ff9999}`); addGlobalStyle(`a {text-decoration: none;} a.diepHack-url:link{color:#FFFFFF} a.diepHack-url:visited{color:#FFFFFF;} a.diepHack-url:hover{color:#00B2E1;text-decoration: underline;} a.diepHack-url:active{color:#FFE66C;}`); addGlobalStyle(`.diepHack-hr{position: relative; height: 1px; border-width: 0; background-image: -webkit-linear-gradient(left, transparent 0%,#00B2E1 50%,transparent 100%); background-image: linear-gradient(90deg, transparent 0%,#00B2E1 50%,transparent 100%);}`); addGlobalStyle(`                        a.diepHack-button {                             display: inline-block;                             margin: 15px 15px 0;                             padding: .6em 1.1em;                             font-size: 14px;                             font-weight: bold;                             text-decoration: none;                             outline: none;                             color: #FFFFFF;                             text-align center;                             border-radius: 32px;                             -webkit-background-clip: padding-box;                             background-clip: padding-box;                             -webkit-box-shadow: 0 0 0 -2px #FFFFFF, 0 0 0 -1px #00B2E1;                             box-shadow: 0 0 0 -2px #FFFFFF, 0 0 0 -1px #00B2E1;                             border: none;                             -webkit-transition: -webkit-box-shadow .3s; transition: box-shadow .3s; cursor: pointer }                        a.diepHack-button:hover, a.diepHack-button:focus { -webkit-box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #00B2E1; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #00B2E1; -webkit-transition-timing-function: cubic-bezier(0.6, 4, 0.3, 0.8); transition-timing-function: cubic-bezier(0.6, 4, 0.3, 0.8); -webkit-animation: gelatine 0.5s 1; animation: gelatine 0.5s 1; }                        a.diepHack-button-secondary { background: #FFFFFF; -webkit-box-shadow: 0 0 0 -2px #FFFFFF, 0 0 0 -1px #FFFFFF; box-shadow: 0 0 0 -2px #FFFFFF, 0 0 0 -1px #FFFFFF; }                        a.diepHack-button-secondary:hover { -webkit-box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #FFFFFF; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #FFFFFF; }                        a.diepHack-button:active, a.diepHack-button-secondary:active { background: #FFFFFF; -webkit-transition-duration: 0; transition-duration: 0; -webkit-box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #FFFFFF; box-shadow: 0 0 0 2px #00B2E1, 0 0 0 4px #FFFFFF; color: #00B2E1; }                        @keyframes gelatine { from, to { -webkit-transform: scale(1, 1); transform: scale(1, 1); }                            25% {                                 -webkit-transform: scale(0.9, 1.1); transform: scale(0.9, 1.1); }                            50% {                                 -webkit-transform: scale(1.1, 0.9); transform: scale(1.1, 0.9); }                            75% {                                 -webkit-transform: scale(0.95, 1.05); transform: scale(0.95, 1.05); }                            from, to { -webkit-transform: scale(1, 1); transform: scale(1, 1); }                            25% {                                 -webkit-transform: scale(0.9, 1.1); transform: scale(0.9, 1.1); }                            50% {                                 -webkit-transform: scale(1.1, 0.9); transform: scale(1.1, 0.9); }                            75% {                                 -webkit-transform: scale(0.95, 1.05); transform: scale(0.95, 1.05); }                        }                         @-webkit-keyframes gelatine { from, to { -webkit-transform: scale(1, 1); transform: scale(1, 1); }                            25% {                                 -webkit-transform: scale(0.9, 1.1); transform: scale(0.9, 1.1); }                            50% {                                 -webkit-transform: scale(1.1, 0.9); transform: scale(1.1, 0.9); }                            75% {                                 -webkit-transform: scale(0.95, 1.05); transform: scale(0.95, 1.05); }                            from, to { -webkit-transform: scale(1, 1); transform: scale(1, 1); }                            25% {                                 -webkit-transform: scale(0.9, 1.1); transform: scale(0.9, 1.1); }                            50% {                                 -webkit-transform: scale(1.1, 0.9); transform: scale(1.1, 0.9); }                            75% {                                 -webkit-transform: scale(0.95, 1.05); transform: scale(0.95, 1.05); }                       }                 `);         function addGlobalStyle(css) {             var head, style;             head = document.getElementsByTagName('head')[0];             if (!head) {                 return;             }             style = document.createElement('style');             style.type = 'text/css';             style.innerHTML = css;             head.appendChild(style);         }     }     // *** JSの初期化 *** //     function jsInit {         addGlobalJavaScript(` function achievementFlag(aflag){ var achievementCode = JSON.parse('{"A::1ba4250a398116e7_1":"' + String(aflag) + '","A::1c00693fbf538316_1":"' + String(aflag) + '","A::22d84fdc78b1f1ae_1":"' + String(aflag) + '","A::22fd2ee6d05881d6_1":"' + String(aflag) + '","A::256245339c3742d2_1":"10000","A::2780b5743fe93789_1":"' + String(aflag) + '","A::300ddd6f1fb3d69d_1":"500","A::33e4cb47afd5602f_1":"10","A::3fd17b5d35c36670_1":"' + String(aflag) + '","A::4d545ac615beec40_1":"' + String(aflag) + '","A::4eebb78f4ee19cba_1":"' + String(aflag) + '","A::54084a4936c7e37_1":"' + String(aflag) + '","A::5613de303c7e06f0_1":"' + String(aflag) + '","A::5892e09831854ad2_1":"' + String(aflag) + '","A::5dbb422e510cec75_1":"' + String(aflag) + '","A::6502bcb56dfbc0e3_1":"' + String(aflag) + '","A::6520a970c68efb85_1":"' + String(aflag) + '","A::6d07f075d9877ab_1":"' + String(aflag) + '","A::6d671cfa6dceb09_1":"500","A::71c663fb258f5243_1":"' + String(aflag) + '","A::723c26b6a37fccbb_1":"100","A::76646f423e5d6bc4_1":"' + String(aflag) + '","A::8221180ec6d53232_1":"10000","A::87e48332e9161b3d_1":"' + String(aflag) + '","A::8abd923027114f9e_1":"1000","A::8b83f81f510fd136_1":"10","A::8b8fe153a4965c63_1":"' + String(aflag) + '","A::8eeec8c270ef92be_1":"' + String(aflag) + '","A::9898db9ff6d3c1b3_1":"' + String(aflag) + '","A::9953423e884422b6_1":"100","A::9f0edada2bd7cd6_1":"' + String(aflag) + '","A::a402fdb3f5cebf99_1":"' + String(aflag) + '","A::a81a738312c7705d_1":"' + String(aflag) + '","A::b8b3e7fd58ff6706_1":"' + String(aflag) + '","A::b95a9621ccccad3c_1":"' + String(aflag) + '","A::bb9188cddc9d5b1f_1":"100","A::bdf3e0a1c4ebcaee_1":"' + String(aflag) + '","A::cdf66074bb5ce7fa_1":"' + String(aflag) + '","A::d3e4829583362b48_1":"3000","A::d583013681f15fcc_1":"' + String(aflag) + '","A::d932ec7312510a14_1":"10","A::e1f4f3e6a5c9bacb_1":"' + String(aflag) + '","A::e6111736c85494e9_1":"' + String(aflag) + '","A::eb9792219de8f755_1":"' + String(aflag) + '","A::ecea90c4be06d999_1":"' + String(aflag) + '","A::eef89695be793c7f_1":"100","A::f3618c60205d7ded_1":"' + String(aflag) + '","A::f73016825baab042_1":"100","A::fc3b3faf73bae216_1":"' + String(aflag) + '","A::bae942e2191270e_1":"' + String(aflag) + '"}'); Object.keys(achievementCode).forEach((k) => {localStorage.setItem(k, achievementCode[k])}); location.reload(true); };        `);         function addGlobalJavaScript(js) {             var head, script;             head = document.getElementsByTagName('head')[0];             if (!head) {                 return;             }             script = document.createElement('script');             script.type = 'text/javascript';             script.innerHTML = js;             head.appendChild(script);         }     }     // *** HTMLの初期化 *** //     function bodyInit {         document.getElementsByTagName('body')[0].appendChild(diepHackMenu);         diepHackMenu.style = "position:absolute; top:55px; left:0px; font-family: Ubuntu; color: #FFFFFF; font-style: normal; font-variant: normal; text-shadow: black 2px 0px, black -2px 0px, black 0px -2px, black 0px 2px, black 2px 2px, black -2px 2px, black 2px -2px, black -2px -2px, black 1px 2px, black -1px 2px, black 1px -2px, black -1px -2px, black 2px 1px, black -2px 1px, black 2px -1px, black -2px -1px;"; diepHackMenu.innerHTML = `  DiepHack` + diepHackSystem_years + ` &nbsp&nbsp by Ponyoで～す[🇯🇵] &nbsp-&nbsp(Homepage)  System  Achievement  Instantly Maximum Stat  Instantly Best Stat   Changelog Last updated: June 26th 2019 *Bug fix *Users not only report bugs, they even fix bugs and send in fixes `;   }     // *** コンソールの処理 *** // document.onkeydown = function { if ( event.keyCode == 13 ) { diepHackCommandError = true; diepHackConsole = document.getElementById('textInput').value; if ( diepHackConsole == "dh-help" ) { diepHackCommandError = false; alert('DiepHack' + diepHackSystem_years + ' command list\n\ndh-help #Show command list.\ndh-version #Getting the DiepHack version.\n'); }            if ( diepHackConsole == "dh-version" ) { diepHackCommandError = false; alert('DiepHack' + diepHackSystem_years + ' - version : ' + diepHackSystem_version + ' Service ' + diepHackSystem_years + ' - ' + ( 1 + Number(diepHackSystem_years) ) + ' Copyright Ponyo.'); }            if ( diepHackCommandError == false ) { document.getElementById('textInput').value = ""; }        }     }