diff --git a/Clicking/index.html b/Clicking/index.html deleted file mode 100644 index 4c2dcf4..0000000 --- a/Clicking/index.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BRB - Clicking - - - - - - - - - -
- - -
-

-

- - -
- - -
- - -
- -
- - - - - - - - - - \ No newline at end of file diff --git a/Shop/index.html b/Shop/index.html deleted file mode 100644 index 6e4b07d..0000000 --- a/Shop/index.html +++ /dev/null @@ -1,774 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - BRB - Shop - - - - - - - - - - -
-
- -

-
-
- - - - -
-
- -
-

- -
- - -
- -

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- - -
-

- -
- - -
-
- - -
-

-
- -
- - - -
- -
-

- -
- - -
-

-

-
- - -
-

- -
- - -
-

-

-
-
- -
- - - - - - - - - - - - - \ No newline at end of file diff --git a/Upgrade/index.html b/Upgrade/index.html deleted file mode 100644 index 4104aac..0000000 --- a/Upgrade/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - BRB - Upgrades - - - - - - - - -
-
- -

-
-
- -
- -
-

BRB

- -
- -
- -

-
- - -
-

Prestige

- -
- -
-
- - -
- -

-

-
-
- - - - - - - - \ No newline at end of file diff --git a/changelog b/changelog index 32d9f22..f909909 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,13 @@ + v47 + Added: Forced Dark/Light mode + Forced Language (depending on the language of the browser) + Shop 3.5!!! + RPG in Settings... + + Fixed: Loading time + + Removed: Option for changing Lang or Mode + v46 Added: Animals - Panthers, Coyotes, Frogs, Bears, Pigs, Seals New formating of the text and font in Clicking, Shop, Upgrades diff --git a/css/basic.css b/css/basic.css new file mode 100644 index 0000000..9d41302 --- /dev/null +++ b/css/basic.css @@ -0,0 +1,3 @@ +body{ + background: #333; +} \ No newline at end of file diff --git a/css/brb.css b/css/brb.css index 6b99b93..947634c 100644 --- a/css/brb.css +++ b/css/brb.css @@ -77,4 +77,32 @@ body{ } .changelog:hover svg{ color: #a33; +} + +/* Ligt NODE */ +@media (prefers-color-scheme: light){ + body{ + background: #fff; + } + #jonathan{ + background: radial-gradient(125% 100% at 50% 0%,#9aff9a 20%,#fff 70%); + } + #disclick{ + color: #000; + text-shadow: none; + } +} + +/* DARJ MODE */ +@media (prefers-color-scheme: dark){ + body{ + background: #333; + } + #jonathan{ + background: radial-gradient(125% 100% at 50% 0%,#5add5a 20%,#333 70%); + } + #disclick{ + color: #f5f5f5; + text-shadow: 2px 2px 4px #000; + } } \ No newline at end of file diff --git a/css/sett.css b/css/sett.css index 9a6ee82..727f0b2 100644 --- a/css/sett.css +++ b/css/sett.css @@ -66,7 +66,7 @@ main section button{ position: relative; width: 150px; height: 50px; - background: cornflowerblue; + background: var(--cls); display: flex; flex-direction: row; justify-content: space-around; @@ -83,6 +83,7 @@ main section button{ display: flex; justify-content: center; align-items: center; + cursor: pointer; } .site img{ height: 25px; @@ -95,4 +96,52 @@ main section button{ ::-webkit-scrollbar-thumb{ background: linear-gradient(transparent, #00ec00); border-radius: 0 0 0.5rem 0.5rem; +} + +/* Ligt NODE */ +@media (prefers-color-scheme: light){ + body{ + background: #ddd; + } + .item{ + background: #ffefd5; + color: #000; + } + .change{ + background: #8fbc8f; + color: #fff; + text-shadow: none; + } + h3{ + color: #000; + text-shadow: none; + } + #sites{ + color: #000; + text-shadow: none; + } +} + +/* DARJ MODE */ +@media (prefers-color-scheme: dark){ + body{ + background: #333; + } + .item{ + background: #666055; + color: #fff; + } + .change{ + background: #008b8b; + color: #fff; + text-shadow: 2px 2px 4px #000; + } + h3{ + color: #eee; + text-shadow: 2px 2px 4px #000; + } + #sites{ + color: #fff; + text-shadow: 2px 2px 4px #000; + } } \ No newline at end of file diff --git a/css/shop.css b/css/shop.css index 55f487a..5cc198d 100644 --- a/css/shop.css +++ b/css/shop.css @@ -75,59 +75,61 @@ body { border: none; top: 5px; margin: 2rem/* 1.5vw 2rem 1.5vw*/; - padding: 1rem; + padding: .5rem 1rem 0 .5rem; border-radius: 6.9px; display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; - width: 400px; - min-height: 340px; + width: 300px; + min-height: 275px; filter: drop-shadow(0px 20px 14px #444); text-align: center; } -.item img{ - width: 100px; +.item .title{ + display: flex; + flex-direction: row-reverse; + justify-content: center; + align-items: center; +} + +.item .title img{ + width: 50px; aspect-ratio: 1/1; - margin: 0.5rem; + margin-right: 1.25rem; object-fit: contain; filter: drop-shadow(10px 8px 6px #333); pointer-events: none } .buttons{ display: flex; - justify-content: space-around; } /* By MrEidam */ .buttons button{ background-color: var(--Bcolor); - border-radius: 8px; - margin: 1rem; } .buyone{ - width: 200px; + width: 190px; height: 50px; - cursor: pointer; + border-radius: 8px 0 0 8px; } .buymax{ - width: 50px; + width: 45px; height: 50px; - cursor: pointer; + border-radius: 0 8px 8px 0; + border-left: #00000033 solid; } /* By MrEidam */ .clickbtn{ display: flex; - justify-content: space-around; } .clickbtn button{ background-color: var(--Bcolor); - border-radius: 8px; - margin: 0 1rem 0.5rem 1rem; } .row{ @@ -138,6 +140,7 @@ body { button{ border: none; filter: drop-shadow(8px 6px 4px #555); + cursor: pointer; } .upwards{ @@ -173,4 +176,39 @@ button{ ::-webkit-scrollbar-thumb{ background: linear-gradient(transparent, #00ec00); border-radius: 0 0 0.5rem 0.5rem; +} + +@media (prefers-color-scheme: dark){ + body{ + background: #333; + color: #fff; + } + .item{ + background: #666055; + } + #logclick{ + background: #666055; + border: 5px dashed #006; + filter: drop-shadow(10px 8px 6px #222); + } + #disclick{ + text-shadow: 2px 2px 4px #000; + } +} +@media (prefers-color-scheme: light){ + body{ + background: #ddd; + color: #000; + } + .item{ + background: #ffefd5; + } + #logclick{ + background: #ffefd5; + border: 5px dashed #00f; + filter: drop-shadow(10px 8px 6px #222); + } + #disclick{ + text-shadow: none; + } } \ No newline at end of file diff --git a/css/title.css b/css/title.css index d70fae2..1d11cfb 100644 --- a/css/title.css +++ b/css/title.css @@ -26,9 +26,6 @@ header{ color: #fff; border-radius: 0 0 2rem 2rem; box-shadow: 0 0 50px 10px #fff; -} -h1{ - } h3{ position: absolute; @@ -36,6 +33,8 @@ h3{ } img{ width: 300px; + cursor: pointer; + border-radius: 50%; } #jonathan{ z-index: -36; @@ -136,4 +135,23 @@ footer{ transform: rotate(calc(360deg/-4*var(--i))); box-shadow: 0 3px 4px rgba(0,0,0,0.15) } -.socmenu li a img{width:1em;} \ No newline at end of file +.socmenu li a img{width:1em;} + +@media (prefers-color-scheme: dark){ + body{ + background: #333; + color: #fff; + } + h3{ + color: #fff; + } +} +@media (prefers-color-scheme: light){ + body{ + background: #ddd; + color: #000; + } + h3{ + color: #000; + } +} \ No newline at end of file diff --git a/css/upgr.css b/css/upgr.css index 825ac86..8840dcc 100644 --- a/css/upgr.css +++ b/css/upgr.css @@ -190,4 +190,35 @@ h2{ ::-webkit-scrollbar-thumb{ background: linear-gradient(transparent, #00ec00); border-radius: 0 0 0.5rem 0.5rem; +} + + +/* Ligt NODE */ +@media (prefers-color-scheme: light){ + body{ + background: #ddd; + color: #000; + } + #loglm{ + background: #ffefd5; + filter: drop-shadow(10px 8px 6px #222); + } + .item{ + background: #ffefd5; + } +} + +/* DARJ MODE */ +@media (prefers-color-scheme: dark){ + body{ + background: #333; + color: #fff; + } + .item{ + background: #666055; + } + #loglm{ + background: #666055; + filter: drop-shadow(10px 8px 6px #222); + } } \ No newline at end of file diff --git a/index.html b/index.html index 0460255..be45639 100644 --- a/index.html +++ b/index.html @@ -24,39 +24,26 @@ - - + + + + + + + BRB - Main Menu - - -
-

BRB THE GAME

-
-

- - - -
- - -
-
  • - -
  • -
  • - -
  • - -
    - - -
    -
    - - + + + + + + + + + + + \ No newline at end of file diff --git a/js/htmls.js b/js/htmls.js new file mode 100644 index 0000000..f6b7830 --- /dev/null +++ b/js/htmls.js @@ -0,0 +1,1031 @@ +const htmlTitle = ` +
    +

    BRB THE GAME

    +
    +

    + + + + +
    + + +
    +
  • + +
  • +
  • + +
  • + +
    + + +
    +
    +`; + +const htmlClicking = ` +
    + + +
    +

    +

    + + +
    + + +
    + + +
    + +
    + + + `; + +const htmlShop = ` + +
    +
    + +

    +
    +
    + + + + +
    +
    + +
    +
    +

    + +
    +
    + + +
    + +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +
    + + +
    +

    +
    + +
    + + + +
    + +
    +
    +

    + +
    +
    + + +
    +

    +
    + + +
    +
    +

    + +
    +
    + + +
    +

    +
    +
    + +
    + + + + + +`; + +const htmlUpgrade = ` + +
    +
    + +

    +
    +
    + +
    + +
    +

    BRB

    + +
    + +
    + +

    +
    + + +
    +

    Prestige

    + +
    + +
    +
    + + +
    + +

    +

    +
    +
    + + `; + +const htmlSettings = ` +
    + +
    +
    +

    + +
    +
    +

    + +
    +
    + +
    +

    +
    + +

    History

    + +
    + +

    RPG

    + +
    +
    +
    + + + `; + +function toTitle(){ + document.getElementById('link').href = '../css/title.css'; + document.getElementById('icon').href = '../img/brb-still.png'; + document.body.innerHTML = htmlTitle; +} + +function toClick(){ + document.getElementById('link').href = '../css/brb.css'; + document.getElementById('icon').href = '../img/brb-still.png'; + if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ + document.documentElement.setAttribute('lang', 'cz'); + document.title = 'BRB - Klikání'; + }else{ + document.documentElement.setAttribute('lang', 'en'); + document.title = 'BRB - Clicking'; + } + document.body.innerHTML = htmlClicking; + checklang(); + uploadClicking(); + menuStart(); +} + +function toShop(){ + document.getElementById('link').href = '../css/shop.css'; + document.getElementById('icon').href = '../img/shop.png'; + if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ + document.documentElement.setAttribute('lang', 'cz'); + document.title = 'BRB - Obchod'; + }else{ + document.documentElement.setAttribute('lang', 'en'); + document.title = 'BRB - Shop'; + } + document.body.innerHTML = htmlShop; + checklang(); + loadShop(); + menuStart(); +} + +function toUpgrade(){ + document.getElementById('link').href = '../css/upgr.css' + document.getElementById('icon').href = '../img/upgrade-icon-png-12.jpg'; + if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ + document.documentElement.setAttribute('lang', 'cz'); + document.title = 'BRB - Vylepšení'; + }else{ + document.documentElement.setAttribute('lang', 'en'); + document.title = 'BRB - Upgrades'; + } + document.body.innerHTML = htmlUpgrade; + checklang(); + loadUpgrades(); + menuStart(); +} + +function toSetting(){ + document.getElementById('link').href = '../css/sett.css' + document.getElementById('icon').href = '../img/settings.svg'; + if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ + document.documentElement.setAttribute('lang', 'cz'); + document.title = 'BRB - Nastavení'; + }else{ + document.documentElement.setAttribute('lang', 'en'); + document.title = 'BRB - Settings'; + } + document.body.innerHTML = htmlSettings; + checklang(); + loadSettings(); + menuStart(); +} \ No newline at end of file diff --git a/js/jquery.js b/js/jquery.js new file mode 100644 index 0000000..798cc8b --- /dev/null +++ b/js/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0 { - if(event.key == ' ' || event.key == 'Enter'){ + if((event.key == ' ' || event.key == 'Enter')&&(document.title === 'BRB - Klikání'||document.title === 'BRB - Clicking')){ clicking(); } }) \ No newline at end of file diff --git a/js/menu.js b/js/menu.js index e956bd9..f08838b 100644 --- a/js/menu.js +++ b/js/menu.js @@ -1,16 +1,18 @@ -$(document).ready(function(){ - $('.button').click(function(){ - if($(this).hasClass('expand')){ - $('ul').slideUp(function(){ - $('.button').removeClass('expand'); - $('.fas').removeClass('expand'); - }) - }else{ - $(this).addClass('expand'); - setTimeout(function(){ - $('.fas').addClass('expand'); - $('ul').stop().slideDown(); - },50); - } +function menuStart(){ + $(document).ready(() => { + $('.button').click(() => { + if($('.button').hasClass('expand')){ + $('ul').slideUp(() => { + $('.button').removeClass('expand'); + $('.fas').removeClass('expand'); + }); + }else{ + $('.button').addClass('expand'); + setTimeout(() => { + $('.fas').addClass('expand'); + $('ul').stop().slideDown(); + },50); + } + }) }) -}) \ No newline at end of file +} \ No newline at end of file diff --git a/js/sett.js b/js/sett.js index e46e791..3f74b7c 100644 --- a/js/sett.js +++ b/js/sett.js @@ -1,132 +1,89 @@ -let items - -// Update -function update(){ - let i = JSON.stringify(items); - localStorage.setItem('items', i); +while(document.title === 'BRB - Nastavení'||document.title === 'BRB - Settings'){ + } // Load -function load(){ +function loadSettings(){ items = JSON.parse(localStorage.getItem('items')); - LDmodes(); let Btns = document.querySelectorAll('.change'); - if(items.lang == 1){ // EN - document.documentElement.setAttribute('lang', 'en'); - document.title = 'BRB - Settings'; - shop.innerHTML = 'Shop'; - upg.innerHTML = 'Upgrades'; - sett.innerHTML = 'Settings'; - if(items.mode == 0){ld.innerHTML = 'Do you want to
    switch to Dark mode?'; - }else if(items.mode == 1){ld.innerHTML = 'Do you want to
    switch to Light mode?';} - lg.innerHTML = 'Do you want to
    switch to Czech?'; - hl.innerHTML = 'Do you want to
    wantch a video for help?'; - rs.innerHTML = 'Do you want to
    completely reset?'; - Btns.forEach((e) => { - e.innerHTML = 'Yes!'; - }); - sites.innerHTML = 'Other Sites'; - } - if(items.lang == 0){ // CZ - document.documentElement.setAttribute('lang', 'cz'); - document.title = 'BRB - Nastavení'; - shop.innerHTML = 'Obchod'; - upg.innerHTML = 'Vylepšení'; - sett.innerHTML = 'Nastavení'; - if(items.mode == 0){ld.innerHTML = 'Chceš si zapnout
    Tmavý mód?'; - }else if(items.mode == 1){ld.innerHTML = 'Chceš si zapnout
    Světlý mód?';} - lg.innerHTML = 'Chceš si přepnout
    jazyk do Angličtiny?'; + + if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ hl.innerHTML = 'Chceš si pustit
    video pro pomoc?'; rs.innerHTML = 'Chceš kompletně
    resetovat postup?'; Btns.forEach((e) => { e.innerHTML = 'Ano!'; }); sites.innerHTML = 'Další stránky'; -} -} -load(); - -// Upload -function upload(){update();load();} - -function cash(){ - setTimeout (function money(){ - let cs = items.dogs+items.cats*12+items.foxes*18+items.wolfs*100+items.hamsters*130+items.whales*220+items.capybaras*280+items.platapuses*400+items.porcupines*650+items.hippos*950+items.snakes*1000+items.cheetahs*3000+items.pythons*7800+items.girrafes*8400+items.otters*9000+items.meerkat*9800+items.raccoon*14500+items.owl*16000+items.badger*32000+items.squirrel*50000+items.chameleon*70000+items.chicken*120000+items.wombat*280000+items.panther*550000+items.coyote*840000+items.frog*900000+items.bear*950000+items.pig*1150000+items.seal*1300000; - items.clicks += cs*items.pres; - items.lemons += (items.lt3/100)*items.pres; - upload(); - cash(); - },1000); -} -cash(); - -// Dark || Light Mode -function SLDmodes(){ - if(items.mode==0){items.mode=1;upload();} - else if(items.mode==1){items.mode=0;upload();} - LDmodes(); -} -function LDmodes(){ - let Bimts = document.querySelectorAll('.item'); - let Btns = document.querySelectorAll('.change'); - let hhh = document.querySelectorAll('h3'); - if((items.mode||0) == 0){// Light Mode - body.style.background = '#ddd'; - Bimts.forEach((e) => { - e.style.background = '#ffefd5'; - }); + history.innerHTML = `Historie` + }else{ + hl.innerHTML = 'Do you want to
    wantch a video for help?'; + rs.innerHTML = 'Do you want to
    completely reset?'; Btns.forEach((e) => { - e.style.background = '#8FBC8F'; - e.style.color = '#fff'; - e.style.textShadow = ""; + e.innerHTML = 'Yes!'; }); - hhh.forEach((e) => { - e.style.color = '#000'; - e.style.textShadow = ""; - }); - document.getElementById('sites').style.color = '#000'; - document.getElementById('sites').style.textShadow = ''; - }else if(items.mode == 1){// Dark Mode - body.style.background = '#333'; - Bimts.forEach((e) => { - e.style.background = '#666055'; - e.style.color = '#000'; - }); - Btns.forEach((e) => { - e.style.background = '#008B8B'; - e.style.color = '#fff'; - e.style.textShadow = "2px 2px 4px #000"; - }); - hhh.forEach((e) => { - e.style.color = '#eee'; - e.style.textShadow = "2px 2px 4px #000"; - }); - document.getElementById('sites').style.color = '#fff'; - document.getElementById('sites').style.textShadow = '2px 2px 4px #000'; + sites.innerHTML = 'Other Sites'; + history.innerHTML = `History`; } } -function language(){ - if(items.lang == 0){ /* CZ */ - items.lang = 1; - }else if(items.lang == 1){ /* UK */ - items.lang = 0; - } - upload(); -} +// uploadSettings +function uploadSettings(){update();loadSettings();} // HELP function help(){ - if(items.lang == 1){ /* EN */ - window.open('https://youtu.be/G0fP-l-05dM'); - }else if(items.lang == 0){ /* CZ */ - window.open('https://youtu.be/XhmETe4MSVI'); - } + if(navigator.language == 'cs' || navigator.language == 'cs-CZ') window.open('https://youtu.be/XhmETe4MSVI'); + else window.open('https://youtu.be/G0fP-l-05dM'); } // Reset function reset(){ - if((items.lang == 1) && confirm('Do you really want to reset everything?') && confirm('Are you sure?')){ + if((navigator.language == 'cs' || navigator.language == 'cs-CZ')){ + if(confirm('Vážně chceš všechno resetovat?') && confirm('Seš si jistý?')){ + alert('Vše resetováno'); + items = { + clicks:0, + dogs:0, + cats:0, + foxes:0, + wolfs:0, + hamsters:0, + whales:0, + capybaras:0, + platapuses:0, + porcupines:0, + hippos:0, + snakes:0, + cheetahs:0, + pythons:0, + girrafes:0, + lions:0, + otters:0, + meerkat:0, + raccoon:0, + owl:0, + badger:0, + squirrel:0, + chameleon:0, + chicken:0, + wombat:0, + panther:0, + coyote:0, + frog:0, + bear:0, + pig:0, + seal:0, + + + + lemons:0, + lt3:0, + pres:1, + Mclick:1, + token:0, + } + } + }else if((navigator.language != 'cs' || navigator.language != 'cs-CZ')){ + if(confirm('Do you really want to reset everything?') && confirm('Are you sure?')){ alert('Everything Reseted'); items = { clicks:0, @@ -159,59 +116,15 @@ function reset(){ frog:0, bear:0, pig:0, - - - + seal:0, + + + lemons:0, lt3:0, - lang:items.lang, pres:1, - mode:items.mode, Mclick:1, token:0, - } + }} } - if((items.lang == 0) && confirm('Vážně chceš všechno resetovat?') && confirm('Seš si jistý?')){ - alert('Vše resetováno'); - items = { - clicks:0, - dogs:0, - cats:0, - foxes:0, - wolfs:0, - hamsters:0, - whales:0, - capybaras:0, - platapuses:0, - porcupines:0, - hippos:0, - snakes:0, - cheetahs:0, - pythons:0, - girrafes:0, - lions:0, - otters:0, - meerkat:0, - raccoon:0, - owl:0, - badger:0, - squirrel:0, - chameleon:0, - chicken:0, - wombat:0, - panther:0, - coyote:0, - frog:0, - bear:0, - pig:0, - - lemons:0, - lt3:0, - lang:items.lang, - pres:1, - mode:items.mode, - Mclick:1, - token:0, - } - } -} +} \ No newline at end of file diff --git a/js/shop.js b/js/shop.js index a390076..ba41c74 100644 --- a/js/shop.js +++ b/js/shop.js @@ -1,235 +1,17 @@ -let cs +while(document.title === 'BRB - Obchod'||document.title === 'BRB - Shop'){ //! Shopdope + let upArr = document.querySelector('.upwards'); + window.addEventListener('scroll', () => { + if(window.scrollY >= 600){ + upArr.classList.add('active'); + }else{ + upArr.classList.remove('active'); + } + }) -// Update -function update(){ - let i = JSON.stringify(items); - localStorage.setItem('items', i); - cs = items.dogs+items.cats*12+items.foxes*18+items.wolfs*100+items.hamsters*130+items.whales*220+items.capybaras*280+items.platapuses*400+items.porcupines*650+items.hippos*950+items.snakes*1000+items.cheetahs*3000+items.pythons*7800+items.girrafes*8400+items.otters*9000+items.meerkat*9800+items.raccoon*14500+items.owl*16000+items.badger*32000+items.squirrel*50000+items.chameleon*70000+items.chicken*120000+items.wombat*280000+items.panther*550000+items.coyote*840000+items.frog*900000+items.bear*950000+items.pig*1150000+(items.seal||0)*1300000; -} -function c(x){ - items.clicks += x; - console.log(x + ' clicks added!'); - upload(); } -// Load -function load(){ - items = JSON.parse(localStorage.getItem('items')); - LDmodes() - cs = items.dogs+items.cats*12+items.foxes*18+items.wolfs*100+items.hamsters*130+items.whales*220+items.capybaras*280+items.platapuses*400+items.porcupines*650+items.hippos*950+items.snakes*1000+items.cheetahs*3000+items.pythons*7800+items.girrafes*8400+items.otters*9000+items.meerkat*9800+items.raccoon*14500+items.owl*16000+items.badger*32000+items.squirrel*50000+items.chameleon*70000+items.chicken*120000+items.wombat*280000+items.panther*550000+items.coyote*840000+items.frog*900000+items.bear*950000+items.pig*1150000+(items.seal||0)*1300000; - - if(items.lang == 1){ - document.documentElement.setAttribute('lang', 'en'); - document.title = 'BRB - Shop'; - shop.innerHTML = 'Shop'; - upg.innerHTML = 'Upgrades'; - sett.innerHTML = 'Settings'; - - - disclick.innerHTML=`You have ${fornum(items.clicks)} clicks, and making ${fornum(cs*items.pres)} per second!` - - - disdog.innerHTML= - `You have ${fornum(items.dogs)}
    - Generating ${fornum((items.dogs*1)*items.pres)} clicks!` - discat.innerHTML= - `You have ${fornum(items.cats)}
    - Generating ${fornum((items.cats*12)*items.pres)} clicks!` - disfox.innerHTML= - `You have ${fornum(items.foxes)}
    - Generating ${fornum((items.foxes*18)*items.pres)} clicks!` - diswol.innerHTML= - `You have ${fornum(items.wolfs)}
    - Generating ${fornum((items.wolfs*100)*items.pres)} clicks!` - disham.innerHTML= - `You have ${fornum(items.hamsters)}
    - Generating ${fornum((items.hamsters*130)*items.pres)} clicks!` - diswha.innerHTML= - `You have ${fornum(items.whales)}
    - Generating ${fornum((items.whales*220)*items.pres)} clicks!` - discap.innerHTML= - `You have ${fornum(items.capybaras)}
    - Generating ${fornum((items.capybaras*280)*items.pres)} clicks!` - displa.innerHTML= - `You have ${fornum(items.platapuses)}
    - Generating ${fornum((items.platapuses*400)*items.pres)} clicks!` - dispor.innerHTML= - `You have ${fornum(items.porcupines)}
    - Generating ${fornum((items.porcupines*650)*items.pres)} clicks!` - diship.innerHTML= - `You have ${fornum(items.hippos)}
    - Generating ${fornum((items.hippos*950)*items.pres)} clicks!` - dissna.innerHTML= - `You have ${fornum(items.snakes)}
    - Generating ${fornum((items.snakes*1000)*items.pres)} clicks!` - dische.innerHTML= - `You have ${fornum(items.cheetahs)}
    - Generating ${fornum((items.cheetahs*3000)*items.pres)} clicks!` - dispyt.innerHTML= - `You have ${fornum(items.pythons)}
    - Generating ${fornum((items.pythons*7800)*items.pres)} clicks!` - disgir.innerHTML= - `You have ${fornum(items.girrafes)}
    - Generating ${fornum((items.girrafes*8400)*items.pres)} clicks!` - disoth.innerHTML= - `You have ${fornum(items.otters)}
    - Generating ${fornum((items.otters*9000)*items.pres)} clicks!` - dismee.innerHTML= - `You have ${fornum(items.meerkat)}
    - Generating ${fornum((items.meerkat*9800)*items.pres)} clicks!` - disrac.innerHTML= - `You have ${fornum(items.raccoon)}
    - Generating ${fornum((items.raccoon*14500)*items.pres)} clicks!` - disowl.innerHTML= - `You have ${fornum(items.owl)}
    - Generating ${fornum((items.owl*16000)*items.pres)} clicks!` - disbad.innerHTML= - `You have ${fornum(items.badger)}
    - Generating ${fornum((items.badger*32000)*items.pres)} clicks!` - dissqu.innerHTML= - `You have ${fornum(items.squirrel)}
    - Generating ${fornum((items.squirrel*50000)*items.pres)} clicks!` - discha.innerHTML= - `You have ${fornum(items.chameleon)}
    - Generating ${fornum((items.chameleon*70000)*items.pres)} clicks!` - dischi.innerHTML= - `You have ${fornum(items.chicken)}
    - Generating ${fornum((items.chicken*120000)*items.pres)} clicks!` - diswom.innerHTML= - `You have ${fornum(items.wombat)}
    - Generating ${fornum((items.wombat*280000)*items.pres)} clicks!` - dispan.innerHTML= - `You have ${fornum(items.panther)}
    - Generating ${fornum((items.panther*550000)*items.pres)} clicks!` - discoy.innerHTML= - `You have ${fornum(items.coyote)}
    - Generating ${fornum((items.coyote*840000)*items.pres)} clicks!` - disfro.innerHTML= - `You have ${fornum(items.frog)}
    - Generating ${fornum((items.frog*900000)*items.pres)} clicks!` - disbea.innerHTML= - `You have ${fornum(items.bear)}
    - Generating ${fornum((items.bear*950000)*items.pres)} clicks!` - dispig.innerHTML= - `You have ${fornum(items.pig)}
    - Generating ${fornum((items.pig*1150000)*items.pres)} clicks!` - dissea.innerHTML= - `You have ${fornum((items.seal||0))}
    - Generating ${fornum(((items.seal||0)*1300000)*items.pres)} clicks!` - - - - - document.getElementById('dislem').innerHTML=`You have ${fornum(items.lemons)}!` - document.getElementById('dislt3').innerHTML= - `You have ${fornum(items.lt3)}!
    - Generating ${fornum((items.lt3*items.pres))} Lemons
    every 100 sec.` - - - disdogName.innerHTML=`Dogs` - discatName.innerHTML=`Cats` - disfoxName.innerHTML=`Foxes` - diswolName.innerHTML=`Wolfs` - dishamName.innerHTML=`Hamsters` - diswhaName.innerHTML=`Whales` - discapName.innerHTML=`Capybaras` - displaName.innerHTML=`Platypuses` - disporName.innerHTML=`Porcupines` - dishipName.innerHTML=`Hippopotamuses` - dissnaName.innerHTML=`Snakes` - discheName.innerHTML=`Cheetahs` - dispytName.innerHTML=`Pythons` - disgirName.innerHTML=`Girafes` - disottName.innerHTML=`Otters` - dismeeName.innerHTML=`Meerkats` - disracName.innerHTML=`Racoons` - disowlName.innerHTML=`Owls` - disbadName.innerHTML=`Badgers` - dissquName.innerHTML=`Squirrels` - dischaName.innerHTML=`Chameleons` - dischiName.innerHTML=`Chickens` - diswomName.innerHTML=`Wombats` - dispanName.innerHTML=`Panthers` - discoyName.innerHTML=`Coyotes` - disfroName.innerHTML=`Frogs` - disbeaName.innerHTML=`Bears` - dispigName.innerHTML=`Pigs` - disseaName.innerHTML=`Seals` - - - dislemName.innerHTML=`Lemons` - dislt3Name.innerHTML=`Lemon Trees` - - dg1.innerHTML = 'Buy for 100 clicks' - ct1.innerHTML = 'Buy for 10 dogs' - fx1.innerHTML = 'Buy for 15 dogs' - wl1.innerHTML = 'Buy for:
    6 dogs and 5 foxes' - hm1.innerHTML = 'Buy for:
    1 wolf and 2 cats' - wh1.innerHTML = 'Buy for 2 wolfs' - cp1.innerHTML = 'Buy for:
    1 whale and 4 cats' - pl1.innerHTML = 'Buy for:
    1 capybara and 1 wolf' - pr1.innerHTML = 'Buy for:
    1 platypus and 1 whale' - hi1.innerHTML = 'Buy for:
    1 porcupine and 2 hamsters' - sn1.innerHTML = 'Buy for:
    2 whales and 4 hamsters' - ch1.innerHTML = 'Buy for:
    2 snakes and 2 platypuses' - py1.innerHTML = 'Buy for:
    1 cheetah and 5 hippos' - gi1.innerHTML = 'Buy for:
    1 python and 20 foxes' - ot1.innerHTML = 'Buy for:
    1 giraffe and 2 capybaras' - me1.innerHTML = 'Buy for:
    1 otter and 3 whales' - ra1.innerHTML = 'Buy for:
    1 meerkat and 7 porcupines' - ow1.innerHTML = 'Buy for:
    1 racoon and 1 snake' - ba1.innerHTML = 'Buy for:
    1 owl and 2 pythons' - sq1.innerHTML = 'Buy for:
    1 badger and 5 cheetah' - cha1.innerHTML = 'Buy for:
    1 squirrel and 2 meerkats' - chi1.innerHTML = 'Buy for:
    2 squirrels and 1 owl' - wom1.innerHTML = 'Buy for:
    1 chicken and 2 chameleons' - pan1.innerHTML = 'Buy for:
    1 wombat and 2 chickens' - coy1.innerHTML = 'Buy for:
    1 panther and 4 chameleons' - fro1.innerHTML = 'Buy for:
    1 coyote and 40 snakes' - bea1.innerHTML = 'Buy for:
    1 frog and 5 giraffes' - pig1.innerHTML = 'Buy for:
    1 bear and 6 badgers' - sea1.innerHTML = 'Buy for:
    1 pig and 9 otters' - - lm1.innerHTML = 'Buy for 20 cats' - lt1.innerHTML = 'Buy for 5 lemons' - - // Buying for clicks - Cct1.innerHTML = 'Buy for 1,2 k clicks' - Cfx1.innerHTML = 'Buy for 1,8 k clicks' - Cwl1.innerHTML = 'Buy for 10 k clicks' - Chm1.innerHTML = 'Buy for 13 k clicks' - Cwh1.innerHTML = 'Buy for 22 k clicks' - Ccp1.innerHTML = 'Buy for 28 k clicks' - Cpl1.innerHTML = 'Buy for 42 k clicks' - Cpr1.innerHTML = 'Buy for 70 k clicks' - Chi1.innerHTML = 'Buy for 100 k clicks' - Csn1.innerHTML = 'Buy for 150 k clicks' - Cch1.innerHTML = 'Buy for 350 k clicks' - Cpy1.innerHTML = 'Buy for 820 k clicks' - Cgi1.innerHTML = 'Buy for 880 k clicks' - Cot1.innerHTML = 'Buy for 950 k clicks' - Cme1.innerHTML = 'Buy for 1 mil clicks' - Cra1.innerHTML = 'Buy for 1.5 mil clicks' - Cow1.innerHTML = 'Buy for 1.8 mil clicks' - Cba1.innerHTML = 'Buy for 3.5 mil clicks' - Csq1.innerHTML = 'Buy for 5.5 mil clicks' - Ccha1.innerHTML = 'Buy for 7.7 mil clicks' - Cchi1.innerHTML = 'Buy for 13 mil clicks' - Cwom1.innerHTML = 'Buy for 31 mil clicks' - Cpan1.innerHTML = 'Buy for 60.5 mil clicks' - Ccoy1.innerHTML = 'Buy for 92.4 mil clicks' - Cfro1.innerHTML = 'Buy for 99 mil clicks' - Cbea1.innerHTML = 'Buy for 104.5 mil clicks' - Cpig1.innerHTML = 'Buy for 126.5 mil clicks' - Csea1.innerHTML = 'Buy for 143 mil clicks' - } - if(items.lang == 0){ - document.documentElement.setAttribute('lang', 'cz'); - document.title = 'BRB - Obchod'; - shop.innerHTML = 'Obchod'; - upg.innerHTML = 'Vylepšení'; - sett.innerHTML = 'Nastavení'; - +function loadShop(){ + if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ document.getElementById('disclick').innerHTML=`Máš ${fornum(items.clicks)} kliků a děláš ${fornum(cs*items.pres)} za sekundu!` @@ -328,7 +110,7 @@ function load(){ `Máš ${fornum(items.lt3)} citronovníků!
    Tvořící ${fornum((items.lt3*items.pres))} citrónů
    za 100 sec.` - disdogName.innerHTML=`Psy` + disdogName.innerHTML=`Psi` discatName.innerHTML=`Kočky` disfoxName.innerHTML=`Lišky` diswolName.innerHTML=`Vlci` @@ -422,31 +204,207 @@ function load(){ Cbea1.innerHTML = 'Kup za 104,5 mil kliků' Cpig1.innerHTML = 'Kup za 126,5 mil kliků' Csea1.innerHTML = 'Kup za 143 mil kliků' + }else{ + disclick.innerHTML=`You have ${fornum(items.clicks)} clicks, and making ${fornum(cs*items.pres)} per second!` + + + disdog.innerHTML= + `You have ${fornum(items.dogs)}
    + Generating ${fornum((items.dogs*1)*items.pres)} clicks!` + discat.innerHTML= + `You have ${fornum(items.cats)}
    + Generating ${fornum((items.cats*12)*items.pres)} clicks!` + disfox.innerHTML= + `You have ${fornum(items.foxes)}
    + Generating ${fornum((items.foxes*18)*items.pres)} clicks!` + diswol.innerHTML= + `You have ${fornum(items.wolfs)}
    + Generating ${fornum((items.wolfs*100)*items.pres)} clicks!` + disham.innerHTML= + `You have ${fornum(items.hamsters)}
    + Generating ${fornum((items.hamsters*130)*items.pres)} clicks!` + diswha.innerHTML= + `You have ${fornum(items.whales)}
    + Generating ${fornum((items.whales*220)*items.pres)} clicks!` + discap.innerHTML= + `You have ${fornum(items.capybaras)}
    + Generating ${fornum((items.capybaras*280)*items.pres)} clicks!` + displa.innerHTML= + `You have ${fornum(items.platapuses)}
    + Generating ${fornum((items.platapuses*400)*items.pres)} clicks!` + dispor.innerHTML= + `You have ${fornum(items.porcupines)}
    + Generating ${fornum((items.porcupines*650)*items.pres)} clicks!` + diship.innerHTML= + `You have ${fornum(items.hippos)}
    + Generating ${fornum((items.hippos*950)*items.pres)} clicks!` + dissna.innerHTML= + `You have ${fornum(items.snakes)}
    + Generating ${fornum((items.snakes*1000)*items.pres)} clicks!` + dische.innerHTML= + `You have ${fornum(items.cheetahs)}
    + Generating ${fornum((items.cheetahs*3000)*items.pres)} clicks!` + dispyt.innerHTML= + `You have ${fornum(items.pythons)}
    + Generating ${fornum((items.pythons*7800)*items.pres)} clicks!` + disgir.innerHTML= + `You have ${fornum(items.girrafes)}
    + Generating ${fornum((items.girrafes*8400)*items.pres)} clicks!` + disoth.innerHTML= + `You have ${fornum(items.otters)}
    + Generating ${fornum((items.otters*9000)*items.pres)} clicks!` + dismee.innerHTML= + `You have ${fornum(items.meerkat)}
    + Generating ${fornum((items.meerkat*9800)*items.pres)} clicks!` + disrac.innerHTML= + `You have ${fornum(items.raccoon)}
    + Generating ${fornum((items.raccoon*14500)*items.pres)} clicks!` + disowl.innerHTML= + `You have ${fornum(items.owl)}
    + Generating ${fornum((items.owl*16000)*items.pres)} clicks!` + disbad.innerHTML= + `You have ${fornum(items.badger)}
    + Generating ${fornum((items.badger*32000)*items.pres)} clicks!` + dissqu.innerHTML= + `You have ${fornum(items.squirrel)}
    + Generating ${fornum((items.squirrel*50000)*items.pres)} clicks!` + discha.innerHTML= + `You have ${fornum(items.chameleon)}
    + Generating ${fornum((items.chameleon*70000)*items.pres)} clicks!` + dischi.innerHTML= + `You have ${fornum(items.chicken)}
    + Generating ${fornum((items.chicken*120000)*items.pres)} clicks!` + diswom.innerHTML= + `You have ${fornum(items.wombat)}
    + Generating ${fornum((items.wombat*280000)*items.pres)} clicks!` + dispan.innerHTML= + `You have ${fornum(items.panther)}
    + Generating ${fornum((items.panther*550000)*items.pres)} clicks!` + discoy.innerHTML= + `You have ${fornum(items.coyote)}
    + Generating ${fornum((items.coyote*840000)*items.pres)} clicks!` + disfro.innerHTML= + `You have ${fornum(items.frog)}
    + Generating ${fornum((items.frog*900000)*items.pres)} clicks!` + disbea.innerHTML= + `You have ${fornum(items.bear)}
    + Generating ${fornum((items.bear*950000)*items.pres)} clicks!` + dispig.innerHTML= + `You have ${fornum(items.pig)}
    + Generating ${fornum((items.pig*1150000)*items.pres)} clicks!` + dissea.innerHTML= + `You have ${fornum((items.seal||0))}
    + Generating ${fornum(((items.seal||0)*1300000)*items.pres)} clicks!` + + + document.getElementById('dislem').innerHTML= + `You have ${fornum(items.lemons)}!` + document.getElementById('dislt3').innerHTML= + `You have ${fornum(items.lt3)}!
    + Generating ${fornum((items.lt3*items.pres))} Lemons
    every 100 sec.` + + + disdogName.innerHTML=`Dogs` + discatName.innerHTML=`Cats` + disfoxName.innerHTML=`Foxes` + diswolName.innerHTML=`Wolfs` + dishamName.innerHTML=`Hamsters` + diswhaName.innerHTML=`Whales` + discapName.innerHTML=`Capybaras` + displaName.innerHTML=`Platypuses` + disporName.innerHTML=`Porcupines` + dishipName.innerHTML=`Hippopotamuses` + dissnaName.innerHTML=`Snakes` + discheName.innerHTML=`Cheetahs` + dispytName.innerHTML=`Pythons` + disgirName.innerHTML=`Girafes` + disottName.innerHTML=`Otters` + dismeeName.innerHTML=`Meerkats` + disracName.innerHTML=`Racoons` + disowlName.innerHTML=`Owls` + disbadName.innerHTML=`Badgers` + dissquName.innerHTML=`Squirrels` + dischaName.innerHTML=`Chameleons` + dischiName.innerHTML=`Chickens` + diswomName.innerHTML=`Wombats` + dispanName.innerHTML=`Panthers` + discoyName.innerHTML=`Coyotes` + disfroName.innerHTML=`Frogs` + disbeaName.innerHTML=`Bears` + dispigName.innerHTML=`Pigs` + disseaName.innerHTML=`Seals` + + + dislemName.innerHTML=`Lemons` + dislt3Name.innerHTML=`Lemon Trees` + + dg1.innerHTML = 'Buy for 100 clicks' + ct1.innerHTML = 'Buy for 10 dogs' + fx1.innerHTML = 'Buy for 15 dogs' + wl1.innerHTML = 'Buy for:
    6 dogs and 5 foxes' + hm1.innerHTML = 'Buy for:
    1 wolf and 2 cats' + wh1.innerHTML = 'Buy for 2 wolfs' + cp1.innerHTML = 'Buy for:
    1 whale and 4 cats' + pl1.innerHTML = 'Buy for:
    1 capybara and 1 wolf' + pr1.innerHTML = 'Buy for:
    1 platypus and 1 whale' + hi1.innerHTML = 'Buy for:
    1 porcupine and 2 hamsters' + sn1.innerHTML = 'Buy for:
    2 whales and 4 hamsters' + ch1.innerHTML = 'Buy for:
    2 snakes and 2 platypuses' + py1.innerHTML = 'Buy for:
    1 cheetah and 5 hippos' + gi1.innerHTML = 'Buy for:
    1 python and 20 foxes' + ot1.innerHTML = 'Buy for:
    1 giraffe and 2 capybaras' + me1.innerHTML = 'Buy for:
    1 otter and 3 whales' + ra1.innerHTML = 'Buy for:
    1 meerkat and 7 porcupines' + ow1.innerHTML = 'Buy for:
    1 racoon and 1 snake' + ba1.innerHTML = 'Buy for:
    1 owl and 2 pythons' + sq1.innerHTML = 'Buy for:
    1 badger and 5 cheetah' + cha1.innerHTML = 'Buy for:
    1 squirrel and 2 meerkats' + chi1.innerHTML = 'Buy for:
    2 squirrels and 1 owl' + wom1.innerHTML = 'Buy for:
    1 chicken and 2 chameleons' + pan1.innerHTML = 'Buy for:
    1 wombat and 2 chickens' + coy1.innerHTML = 'Buy for:
    1 panther and 4 chameleons' + fro1.innerHTML = 'Buy for:
    1 coyote and 40 snakes' + bea1.innerHTML = 'Buy for:
    1 frog and 5 giraffes' + pig1.innerHTML = 'Buy for:
    1 bear and 6 badgers' + sea1.innerHTML = 'Buy for:
    1 pig and 9 otters' + + lm1.innerHTML = 'Buy for 20 cats' + lt1.innerHTML = 'Buy for 5 lemons' + + // Buying for clicks + Cct1.innerHTML = 'Buy for 1.2 k clicks' + Cfx1.innerHTML = 'Buy for 1.8 k clicks' + Cwl1.innerHTML = 'Buy for 10 k clicks' + Chm1.innerHTML = 'Buy for 13 k clicks' + Cwh1.innerHTML = 'Buy for 22 k clicks' + Ccp1.innerHTML = 'Buy for 28 k clicks' + Cpl1.innerHTML = 'Buy for 42 k clicks' + Cpr1.innerHTML = 'Buy for 70 k clicks' + Chi1.innerHTML = 'Buy for 100 k clicks' + Csn1.innerHTML = 'Buy for 150 k clicks' + Cch1.innerHTML = 'Buy for 350 k clicks' + Cpy1.innerHTML = 'Buy for 820 k clicks' + Cgi1.innerHTML = 'Buy for 880 k clicks' + Cot1.innerHTML = 'Buy for 950 k clicks' + Cme1.innerHTML = 'Buy for 1 mil clicks' + Cra1.innerHTML = 'Buy for 1.5 mil clicks' + Cow1.innerHTML = 'Buy for 1.8 mil clicks' + Cba1.innerHTML = 'Buy for 3.5 mil clicks' + Csq1.innerHTML = 'Buy for 5.5 mil clicks' + Ccha1.innerHTML = 'Buy for 7.7 mil clicks' + Cchi1.innerHTML = 'Buy for 13 mil clicks' + Cwom1.innerHTML = 'Buy for 31 mil clicks' + Cpan1.innerHTML = 'Buy for 60.5 mil clicks' + Ccoy1.innerHTML = 'Buy for 92.4 mil clicks' + Cfro1.innerHTML = 'Buy for 99 mil clicks' + Cbea1.innerHTML = 'Buy for 104.5 mil clicks' + Cpig1.innerHTML = 'Buy for 126.5 mil clicks' + Csea1.innerHTML = 'Buy for 143 mil clicks' } } -load(); -// Upload -function upload(){update();load();} - -function cash(){ - setTimeout (function money(){ - items.clicks += cs*items.pres; - items.lemons += (items.lt3/100)*items.pres; - upload(); - cash();click(); - },1000) -} -cash(); - -function click(){ - setTimeout(function decoration(){ - document.getElementById('imgcli').src = '../img/icons8-clicked.png' - },750); - setTimeout(function decoration(){ - document.getElementById('imgcli').src = '../img/icons8-rest.svg' - },1000) -} +// uploadShop +function uploadShop(){update();loadShop();} // Nákupy function buydog(){ @@ -454,21 +412,21 @@ function buydog(){ items.clicks -= 100; items.dogs += 1; } - upload(); + uploadShop(); } function buycat(){ if(items.dogs>=10){ items.dogs-=10; items.cats+=1; } - upload(); + uploadShop(); } function buyfox(){ if(items.dogs>=15){ items.dogs-=15; items.foxes+=1; } - upload(); + uploadShop(); } function buywol(){ if(items.dogs>=6 && items.foxes>=5){ @@ -476,7 +434,7 @@ function buywol(){ items.foxes-=5; items.wolfs+=1; } - upload(); + uploadShop(); } function buyham(){ if(items.wolfs>=1 && items.cats>=2){ @@ -484,14 +442,14 @@ function buyham(){ items.cats-=2; items.hamsters+=1; } - upload(); + uploadShop(); } function buywha(){ if(items.wolfs>=2){ items.wolfs-=2; items.whales+=1; } - upload(); + uploadShop(); } function buycap(){ if(items.whales>=1 && items.cats>=4){ @@ -499,7 +457,7 @@ function buycap(){ items.cats-=4; items.capybaras+=1; } - upload(); + uploadShop(); } function buypla(){ if(items.capybaras>=1 && items.wolfs>=1){ @@ -507,7 +465,7 @@ function buypla(){ items.wolfs-=1; items.platapuses+=1; } - upload(); + uploadShop(); } function buypor(){ if(items.platapuses>=1 && items.whales>=1){ @@ -515,7 +473,7 @@ function buypor(){ items.whales-=1; items.porcupines++; } - upload(); + uploadShop(); } function buyhip(){ if(items.porcupines>=1 && items.hamsters>=2){ @@ -523,7 +481,7 @@ function buyhip(){ items.hamsters-=2; items.hippos++; } - upload(); + uploadShop(); } function buysna(){ if(items.whales>=2 && items.hamsters>=4){ @@ -531,7 +489,7 @@ function buysna(){ items.hamsters-=4; items.snakes++; } - upload(); + uploadShop(); } function buyche(){ if(items.snakes>=2 && items.platapuses>=2){ @@ -539,7 +497,7 @@ function buyche(){ items.platapuses-=2; items.cheetahs++; } - upload(); + uploadShop(); } function buypyt(){ if(items.cheetahs>=1 && items.hippos>=5){ @@ -547,7 +505,7 @@ function buypyt(){ items.hippos-=5; items.pythons++; } - upload(); + uploadShop(); } function buygir(){ if(items.pythons>=1 && items.foxes>=20){ @@ -555,7 +513,7 @@ function buygir(){ items.foxes-=20; items.girrafes++; } - upload(); + uploadShop(); } function buyoth(){ if(items.girrafes>=1 && items.capybaras>=2){ @@ -563,7 +521,7 @@ function buyoth(){ items.capybaras-=2; items.otters++; } - upload(); + uploadShop(); } function buymee(){ if(items.otters>=1 && items.whales>=3){ @@ -571,7 +529,7 @@ function buymee(){ items.whales-=3; items.meerkat++; } - upload(); + uploadShop(); } function buyrac(){ if(items.meerkat>=1 && items.porcupines>=7){ @@ -579,7 +537,7 @@ function buyrac(){ items.porcupines-=7; items.raccoon++; } - upload(); + uploadShop(); } function buyowl(){ if(items.raccoon>=1 && items.snakes>=1){ @@ -587,7 +545,7 @@ function buyowl(){ items.snakes-=1; items.owl++; } - upload(); + uploadShop(); } function buybad(){ if(items.owl>=1 && items.pythons>=2){ @@ -595,7 +553,7 @@ function buybad(){ items.pythons-=2; items.badger++; } - upload(); + uploadShop(); } function buysqu(){ if(items.badger>=1 && items.cheetahs>=5){ @@ -603,7 +561,7 @@ function buysqu(){ items.cheetahs-=5; items.squirrel++; } - upload(); + uploadShop(); } function buycha(){ if(items.squirrel>=1 && items.meerkat>=2){ @@ -611,7 +569,7 @@ function buycha(){ items.meerkat-=2; items.chameleon++; } - upload(); + uploadShop(); } function buychi(){ if(items.squirrel>=2 && items.owl>=1){ @@ -619,7 +577,7 @@ function buychi(){ items.owl-=1; items.chicken++; } - upload(); + uploadShop(); } function buywom(){ if(items.chicken>=1 && items.chameleon>=2){ @@ -627,7 +585,7 @@ function buywom(){ items.chameleon-=2; items.wombat++; } - upload(); + uploadShop(); } function buypan(){ if(items.wombat>=1 && items.chicken>=2){ @@ -635,7 +593,7 @@ function buypan(){ items.chicken-=2; items.panther++; } - upload(); + uploadShop(); } function buycoy(){ if(items.panther>=1 && items.chameleon>=4){ @@ -643,7 +601,7 @@ function buycoy(){ items.chameleon-=4; items.coyote++; } - upload(); + uploadShop(); } function buyfro(){ if(items.coyote>=1 && items.snakes>=40){ @@ -651,7 +609,7 @@ function buyfro(){ items.snakes-=40; items.frog++; } - upload(); + uploadShop(); } function buybea(){ if(items.frog>=1 && items.girrafes>=5){ @@ -659,7 +617,7 @@ function buybea(){ items.girrafes-=5; items.bear++; } - upload(); + uploadShop(); } function buypig(){ if(items.bear>=1 && items.badger>=6){ @@ -667,7 +625,7 @@ function buypig(){ items.badger-=6; items.pig++; } - upload(); + uploadShop(); } function buysea(){ if(items.pig>=1 && items.otters>=9){ @@ -675,7 +633,7 @@ function buysea(){ items.otters-=9; items.seal++; } - upload(); + uploadShop(); } function buylem(){ @@ -683,18 +641,16 @@ function buylem(){ items.cats-=20; items.lemons+=1; } - upload(); + uploadShop(); } function buylt3(){ if (items.lemons>=5) { items.lemons-=5; items.lt3+=1; } - upload(); + uploadShop(); } - - /*  __ __ _____ _ | \/ | / ____| | | @@ -710,21 +666,21 @@ function mxdg(){ items.clicks -= amount * 100 items.dogs += amount - upload(); + uploadShop(); } function mxct(){ const amount = Math.floor(items.dogs / 10) items.dogs -= amount * 10 items.cats += amount - upload(); + uploadShop(); } function mxfx(){ const amount = Math.floor(items.dogs/15) items.dogs -= amount*15 items.foxes += amount - upload(); + uploadShop(); } function mxlm(){ let RanLemCost = Math.floor(Math.random()*100); @@ -732,21 +688,21 @@ function mxlm(){ items.cats -= amount*RanLemCost items.lemons += amount - upload(); + uploadShop(); } function mxlt(){ const amount = Math.floor(items.lemons/5) items.lemons -= amount*5 items.lt3 += amount - upload() + uploadShop() } function mxwh(){ const amount = Math.floor(items.wolfs/2); items.wolfs -= amount*2; items.whales += amount; - upload(); + uploadShop(); } function mxwl(){ const amount = Math.min(Math.floor(items.foxes/5), Math.floor(items.dogs/6)); @@ -756,7 +712,7 @@ function mxwl(){ items.dogs -= amount*6 items.wolfs += amount } - upload(); + uploadShop(); } function mxhm(){ const amount = Math.min(Math.floor(items.wolfs/1), Math.floor(items.cats/2)); @@ -766,7 +722,7 @@ function mxhm(){ items.cats -= amount*2; items.hamsters += amount; } - upload(); + uploadShop(); } function mxcp(){ const amount = Math.min(Math.floor(items.whales/1), Math.floor(items.cats/4)); @@ -776,7 +732,7 @@ function mxcp(){ items.cats -= amount*4; items.capybaras += amount; } - upload(); + uploadShop(); } function mxpl(){ const amount = Math.min(Math.floor(items.capybaras/1), Math.floor(items.wolfs/1)); @@ -786,7 +742,7 @@ function mxpl(){ items.wolfs -= amount*1; items.platapuses += amount; } - upload(); + uploadShop(); } function mxpr(){ const amount = Math.min(Math.floor(items.platapuses/1), Math.floor(items.whales/1)); @@ -796,7 +752,7 @@ function mxpr(){ items.whales -= amount*1; items.porcupines += amount; } - upload(); + uploadShop(); } function mxhi(){ const amount = Math.min(Math.floor(items.porcupines/1), Math.floor(items.hamsters/2)); @@ -806,7 +762,7 @@ function mxhi(){ items.hamsters -= amount*2; items.hippos += amount; } - upload(); + uploadShop(); } function mxsn(){ const amount = Math.min(Math.floor(items.whales/2), Math.floor(items.hamsters/4)); @@ -816,7 +772,7 @@ function mxsn(){ items.hamsters -= amount*4; items.snakes += amount; } - upload(); + uploadShop(); } function mxch(){ const amount = Math.min(Math.floor(items.snakes/2), Math.floor(items.platapuses/2)); @@ -826,7 +782,7 @@ function mxch(){ items.platapuses -= amount*2; items.cheetahs += amount; } - upload(); + uploadShop(); } function mxpy(){ const amount = Math.min(Math.floor(items.cheetahs/1), Math.floor(items.hippos/5)); @@ -836,7 +792,7 @@ function mxpy(){ items.hippos -= amount*5; items.pythons += amount; } - upload(); + uploadShop(); } function mxgi(){ const amount = Math.min(Math.floor(items.pythons/1), Math.floor(items.foxes/20)); @@ -846,7 +802,7 @@ function mxgi(){ items.foxes -= amount*20; items.girrafes += amount; } - upload(); + uploadShop(); } function mxot(){ const amount = Math.min(Math.floor(items.girrafes/1), Math.floor(items.capybaras/2)); @@ -856,7 +812,7 @@ function mxot(){ items.capybaras -= amount*2; items.otters += amount; } - upload(); + uploadShop(); } function mxme(){ const amount = Math.min(Math.floor(items.otters/1), Math.floor(items.whales/3)); @@ -866,7 +822,7 @@ function mxme(){ items.whales -= amount*3; items.meerkat += amount; } - upload(); + uploadShop(); } function mxra(){ const amount = Math.min(Math.floor(items.meerkat/1), Math.floor(items.porcupines/7)); @@ -876,7 +832,7 @@ function mxra(){ items.porcupines -= amount*7; items.raccoon += amount; } - upload(); + uploadShop(); } function mxow(){ const amount = Math.min(Math.floor(items.raccoon/1), Math.floor(items.snakes/1)); @@ -886,7 +842,7 @@ function mxow(){ items.snakes -= amount*1; items.owl += amount; } - upload(); + uploadShop(); } function mxba(){ const amount = Math.min(Math.floor(items.owl/1), Math.floor(items.pythons/2)); @@ -896,7 +852,7 @@ function mxba(){ items.pythons -= amount*2; items.badger += amount; } - upload(); + uploadShop(); } function mxsq(){ const amount = Math.min(Math.floor(items.badger/1), Math.floor(items.cheetahs/5)); @@ -906,7 +862,7 @@ function mxsq(){ items.cheetahs -= amount*5; items.squirrel += amount; } - upload(); + uploadShop(); } function mxcha(){ const amount = Math.min(Math.floor(items.squirrel/1), Math.floor(items.meerkat/2)); @@ -915,7 +871,7 @@ function mxcha(){ items.meerkat -= amount*2; items.chameleon += amount; } - upload(); + uploadShop(); } function mxchi(){ const amount = Math.min(Math.floor(items.squirrel/2), Math.floor(items.owl/1)); @@ -924,7 +880,7 @@ function mxchi(){ items.owl -= amount*1; items.chicken += amount; } - upload(); + uploadShop(); } function mxwom(){ const amount = Math.min(Math.floor(items.chicken/1), Math.floor(items.chameleon/2)); @@ -933,7 +889,7 @@ function mxwom(){ items.chameleon -= amount*2; items.wombat += amount; } - upload(); + uploadShop(); } function mxpan(){ const amount = Math.min(Math.floor(items.wombat/1), Math.floor(items.chicken/2)); @@ -942,7 +898,7 @@ function mxpan(){ items.chicken -= amount*2; items.panther += amount; } - upload(); + uploadShop(); } function mxcoy(){ const amount = Math.min(Math.floor(items.panther/1), Math.floor(items.chameleon/4)); @@ -951,7 +907,7 @@ function mxcoy(){ items.chameleon -= amount*4; items.coyote += amount; } - upload(); + uploadShop(); } function mxfro(){ const amount = Math.min(Math.floor(items.coyote/1), Math.floor(items.snakes/40)); @@ -960,7 +916,7 @@ function mxfro(){ items.snakes -= amount*40; items.frog += amount; } - upload(); + uploadShop(); } function mxbea(){ const amount = Math.min(Math.floor(items.frog/1), Math.floor(items.girrafes/5)); @@ -969,7 +925,7 @@ function mxbea(){ items.girrafes -= amount*5; items.bear += amount; } - upload(); + uploadShop(); } function mxpig(){ const amount = Math.min(Math.floor(items.bear/1), Math.floor(items.badger/6)); @@ -978,7 +934,7 @@ function mxpig(){ items.badger -= amount*6; items.pig += amount; } - upload(); + uploadShop(); } function mxsea(){ const amount = Math.min(Math.floor(items.pig/1), Math.floor(items.otters/9)); @@ -987,33 +943,7 @@ function mxsea(){ items.otters -= amount*9; items.seal += amount; } - upload(); -} - -// Dark || Light Mode -function LDmodes(){ - let Bimts = document.querySelectorAll('.item'); - if((items.mode||0) == 0){// Light Mode - body.style.background = '#ddd'; - body.style.color = '#000'; - Bimts.forEach((e) => { - e.style.background = '#ffefd5'; - }); - logclick.style.background = '#ffefd5'; - disclick.style.textShadow = ""; - logclick.style.border = '5px dashed #00f'; - logclick.style.filter = 'drop-shadow(10px 8px 6px #222)'; - }else if(items.mode == 1){// Dark Mode - body.style.background = '#333'; - body.style.color = '#fff'; - Bimts.forEach((e) => { - e.style.background = '#666055'; - }); - logclick.style.background = '#666055'; - disclick.style.textShadow = "2px 2px 4px #000"; - logclick.style.border = '5px dashed #006'; - logclick.style.filter = 'drop-shadow(10px 8px 6px #222)'; - } + uploadShop(); } /* SHOPPING WITH ONLY CLICKS */ @@ -1022,7 +952,7 @@ function canimal(animal, cost){ if(items.clicks >= cost){ items[animal]++; items.clicks -= cost; - upload(); + uploadShop(); } } @@ -1032,7 +962,7 @@ function cManimal(animal, cost) { if (quantity > 0) { items[animal] += quantity; items.clicks -= quantity * cost; - upload(); + uploadShop(); } } @@ -1147,14 +1077,4 @@ function mxCpig(){cManimal('pig', 126500000)} // Seal of approval function buyCsea(){canimal('seal', 143000000)} function mxCsea(){cManimal('seal', 143000000)} - -const upArr = document.querySelector('.upwards'); - -window.addEventListener('scroll', () => { - if(window.scrollY >= 600){ - upArr.classList.add('active'); - }else{ - upArr.classList.remove('active'); - } -}) // 892 před V46 | 1160 ve V46 \ No newline at end of file diff --git a/js/title.js b/js/title.js index 808cdde..b9af4d3 100644 --- a/js/title.js +++ b/js/title.js @@ -1,18 +1,112 @@ -// social -let toggle = document.querySelector('.toggle'); -let socmenu = document.querySelector('.socmenu'); -toggle.onclick = function(){ - socmenu.classList.toggle('active'); -}; +let items; +let cs; -if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ - document.title = 'BRB - Hlavní menu' - document.getElementById('tit').innerHTML = 'BRB - HRA'; - document.getElementById('heh').innerHTML = 'Zmáčkni tlačítko aby ses dostal do hry!'; - document.getElementById('foot').innerHTML = `Vytvořil: MrEidam`; -}else{ - document.title = 'BRB - Main Menu'; - document.getElementById('tit').innerHTML = 'BRB THE GAME'; - document.getElementById('heh').innerHTML = 'Press the button to get to the game!'; - document.getElementById('foot').innerHTML = `Made by: MrEidam`; +window.onload = function(){ + let socmenu = document.querySelector('.socmenu'); + let toggle = document.querySelector('.toggle'); + items = { + clicks:0, + dogs:0, + cats:0, + foxes:0, + wolfs:0, + hamsters:0, + whales:0, + capybaras:0, + platapuses:0, + porcupines:0, + hippos:0, + snakes:0, + cheetahs:0, + pythons:0, + girrafes:0, + lions:0, + otters:0, + meerkat:0, + raccoon:0, + owl:0, + badger:0, + squirrel:0, + chameleon:0, + chicken:0, + wombat:0, + panther:0, + coyote:0, + frog:0, + bear:0, + pig:0, + seal:0, + + + + lemons:0, + lt3:0, + pres:1, + Mclick:1, + token:0, + } + load(); + update(); + for(let item in items){ + if(!items[item]){ + items[item] = 0; + } + } + cash(); + if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ + document.title = 'BRB - Hlavní menu' + document.querySelector('#tit').innerHTML = 'BRB - HRA'; + document.querySelector('#heh').innerHTML = 'Zmáčkni tlačítko aby ses dostal do hry!'; + document.querySelector('footer').innerHTML = `Vytvořil: MrEidam`; + }else{ + document.title = 'BRB - Main Menu'; + document.querySelector('#tit').innerHTML = 'BRB THE GAME'; + document.querySelector('#heh').innerHTML = 'Press the button to get to the game!'; + document.querySelector('footer').innerHTML = `Made by: MrEidam`; + } + toggle.onclick = () => { + socmenu.classList.toggle('active'); + }; +} + +function click(){ + setTimeout(() => { + if(document.title === 'BRB - Obchod'||document.title === 'BRB - Shop'){ + document.querySelector('#imgcli').src = '../img/icons8-clicked.png'; + } + },750); + setTimeout(() => { + if(document.title === 'BRB - Obchod'||document.title === 'BRB - Shop'){ + document.querySelector('#imgcli').src = '../img/icons8-rest.svg'; + } + },1000); +} + +function cash(){ + setTimeout (() => { + cs = items.dogs+items.cats*12+items.foxes*18+items.wolfs*100+items.hamsters*130+items.whales*220+items.capybaras*280+items.platapuses*400+items.porcupines*650+items.hippos*950+items.snakes*1000+items.cheetahs*3000+items.pythons*7800+items.girrafes*8400+items.otters*9000+items.meerkat*9800+items.raccoon*14500+items.owl*16000+items.badger*32000+items.squirrel*50000+items.chameleon*70000+items.chicken*120000+items.wombat*280000+items.panther*550000+items.coyote*840000+items.frog*900000+items.bear*950000+items.pig*1150000+(items.seal||0)*1300000; + items.clicks += cs*items.pres; + items.lemons += (items.lt3/100)*items.pres; + update();cash(); + if(document.title === 'BRB - Klikání'||document.title === 'BRB - Clicking'){ + uploadClicking(); + } + if(document.title === 'BRB - Obchod'||document.title === 'BRB - Shop'){ + uploadShop(); + click(); + } + console.log(`Clicks: ${items.clicks}`); + },1000) +} + +function load(){ + if (localStorage.getItem('items')!=null){ + items = JSON.parse(localStorage.getItem('items')); + } +} + +// Update +function update(){ + let i = JSON.stringify(items); + localStorage.setItem('items', i); } \ No newline at end of file diff --git a/js/upgr.js b/js/upgr.js index 81e1b8b..6f9d03e 100644 --- a/js/upgr.js +++ b/js/upgr.js @@ -1,10 +1,8 @@ -let items; -let cs; - -// Update -function update(){ - let i = JSON.stringify(items); - localStorage.setItem('items', i); +function loadUpgrades(){ + if (localStorage.getItem('items')!=null){ + items = JSON.parse(localStorage.getItem('items')); + prog.max = 1000*items.pres; + } if(items.token >= 1000*items.pres){ prog.style.display = 'none'; presBT1.style.display = 'none'; @@ -12,79 +10,32 @@ function update(){ progva.style.display = 'none'; ItsTime.style.display = 'block'; } -} - -function load(){ - if (localStorage.getItem('items')!=null){ - items = JSON.parse(localStorage.getItem('items')); - LDmodes() - prog.max = 1000*items.pres; - - } - if(items.lang == 0){ // CZ - document.documentElement.setAttribute('lang', 'cz'); - document.title = 'BRB - Vylepšení' - shop.innerHTML = 'Obchod'; - upg.innerHTML = 'Vylepšení'; - sett.innerHTML = 'Nastavení'; + if(navigator.language == 'cs' || navigator.language == 'cs-CZ'){ // CZ dislm.innerHTML = `Máš ${fornum(items.lemons)} citrónů!`; disMcmake.innerHTML = `Každý klik ti dává ${fornum((items.Mclick||1)*items.pres)} kliků!`; Mc1.innerHTML = `Vylepšení na kliky za
    ${fornum(10+(items.Mclick||1)*(items.Mclick||1)-1)} citrónů`; - progva.innerHTML = `Máš ${items.token} lístků z ${1000*items.pres}!` + progva.innerHTML = `Máš ${items.token} lístků z ${1000*items.pres}!`; - - - - presBT1.innerHTML = `1 Lístek za
    ${fornum(2000)} Citrónů` + + presBT1.innerHTML = `1 Lístek za
    ${fornum(2000)} Citrónů`; ItsTime.innerHTML = `Pojďme jít!`; - if(items.pres > 1){ - got.innerHTML = `Právě máš ${items.pres-1} Prestiž bodů` - } - - + if(items.pres > 1) got.innerHTML = `Právě máš ${items.pres-1} Prestiž bodů`; }else if(items.lang == 1){ // En - document.documentElement.setAttribute('lang', 'en'); - document.title = 'BRB - Upgrades' - shop.innerHTML = 'Shop'; - upg.innerHTML = 'Upgrades'; - sett.innerHTML = 'Settings'; dislm.innerHTML = `You've got ${fornum(items.lemons)} lemons!`; disMcmake.innerHTML = `Every click gives you ${fornum((items.Mclick||1)*items.pres)} clicks!`; Mc1.innerHTML = `Upgrade for your clicks
    for ${fornum(10+(items.Mclick||1)*(items.Mclick||1)-1)} lemons`; progva.innerHTML = `You have ${items.token} tokens out of ${1000*items.pres}!` - - - presBT1.innerHTML = `1 Ticket for ${fornum(2000)} Lemons` + presBT1.innerHTML = `1 Ticket for ${fornum(2000)} Lemons`; ItsTime.innerHTML = `Let's do this!`; - if(items.pres > 1){ - got.innerHTML = `You have ${items.pres-1} Prestige points` - } - } - - -} - -// Upload -function upload(){update();load();} - -function cash(){ - setTimeout (function money(){ - cs = items.dogs+items.cats*12+items.foxes*18+items.wolfs*100+items.hamsters*130+items.whales*220+items.capybaras*280+items.platapuses*400+items.porcupines*650+items.hippos*950+items.snakes*1000+items.cheetahs*3000+items.pythons*7800+items.girrafes*8400+items.otters*9000+items.meerkat*9800+items.raccoon*14500+items.owl*16000+items.badger*32000+items.squirrel*50000+items.chameleon*70000+items.chicken*120000+items.wombat*280000+items.panther*550000+items.coyote*840000+items.frog*900000+items.bear*950000+items.pig*1150000+(items.seal||0)*1300000; - items.clicks += cs*items.pres; - items.lemons += (items.lt3/100)*items.pres; - upload();cash(); - },1000) -} - -window.onload = function(){ - load();cash();progress(); - if((items.token != 0)&&(items.token < 1)){ - items.token = 0; + if(items.pres > 1) got.innerHTML = `You have ${items.pres-1} Prestige points`; } } +// UploadUpgrades +function uploadUpgrades(){update();loadUpgrades();} + /* U P G R A D E S */ function buyMcc(){ @@ -94,8 +45,7 @@ function buyMcc(){ items.Mclick = 1; } items.Mclick += 4; - console.log(items.Mclick); - upload(); + uploadUpgrades(); } } @@ -105,7 +55,7 @@ function tblb(){ // Token Basic Lemon Buy items.token++; } progress(); - upload(); + uploadUpgrades(); } function talb(){ // Token All Lemon Buy @@ -114,17 +64,17 @@ function talb(){ // Token All Lemon Buy items.lemons -= amount * 2000; items.token += amount; progress(); - upload(); + uploadUpgrades(); } function progress(){ - prog.value = `${items.token}` - prog.title = `${items.token}/${1000*items.pres}` - upload(); + prog.value = `${items.token}`; + prog.title = `${items.token}/${1000*items.pres}`; + uploadUpgrades(); } function TheThing(){ - if(items.lang == 0 && items.token >= (1000*items.pres) && confirm(`Za Prestiže budeš získávat více kliků, ale tvůj postup se vynuluje (až na Prestiž body). Chceš se 'Znovuzrodit'?`)){ // CZ + if(navigator.language == 'cs' || navigator.language == 'cs-CZ' && items.token >= (1000*items.pres) && confirm(`Za Prestiže budeš získávat více kliků, ale tvůj postup se vynuluje (až na Prestiž body). Chceš se 'Znovuzrodit'?`)){ // CZ if(items.pres>=5){ alert(`Získal jsi 1 prestiže bod!`); items.pres += 1; @@ -132,8 +82,8 @@ function TheThing(){ alert(`Získal jsi 0.5 prestiže bodů!`); items.pres += 0.5; } - upload(); - items = { + uploadUpgrades(); + items = { clicks:0, dogs:0, cats:0, @@ -165,94 +115,64 @@ function TheThing(){ bear:0, pig:0, seal:0, - - + lemons:0, lt3:0, - lang:items.lang, pres:items.pres, - mode:items.mode, Mclick:1, token:0, } - location.href = './index.html'; - - - - }else if(items.lang == 1 && items.token >= (1000*items.pres) && confirm(`For Prestige You'll earn more clicks, but your progress resets (except prestige points). Do you wish to 'Rebirth'?`)){ // En - if(items.pres>=5){ - alert(`You've earn 1 prestige point!`); - items.pres += 1; - }else{ - alert(`You've earn 0.5 prestige points!`); - items.pres += 0.5; - } - upload(); - items = { - clicks:0, - dogs:0, - cats:0, - foxes:0, - wolfs:0, - hamsters:0, - whales:0, - capybaras:0, - platapuses:0, - porcupines:0, - hippos:0, - snakes:0, - cheetahs:0, - pythons:0, - girrafes:0, - lions:0, - otters:0, - meerkat:0, - raccoon:0, - owl:0, - badger:0, - squirrel:0, - chameleon:0, - chicken:0, - wombat:0, - panther:0, - coyote:0, - frog:0, - bear:0, - pig:0, - seal:0, - - - lemons:0, - lt3:0, - lang:items.lang, - pres:items.pres, - mode:items.mode, - Mclick:1, - token:0, + toClick(); + }else{ + if(items.lang == 1 && items.token >= (1000*items.pres) && confirm(`For Prestige You'll earn more clicks, but your progress resets (except prestige points). Do you wish to 'Rebirth'?`)){ // En + if(items.pres>=5){ + alert(`You've earn 1 prestige point!`); + items.pres += 1; + }else{ + alert(`You've earn 0.5 prestige points!`); + items.pres += 0.5; } - location.href = './index.html'; + uploadUpgrades(); + items = { + clicks:0, + dogs:0, + cats:0, + foxes:0, + wolfs:0, + hamsters:0, + whales:0, + capybaras:0, + platapuses:0, + porcupines:0, + hippos:0, + snakes:0, + cheetahs:0, + pythons:0, + girrafes:0, + lions:0, + otters:0, + meerkat:0, + raccoon:0, + owl:0, + badger:0, + squirrel:0, + chameleon:0, + chicken:0, + wombat:0, + panther:0, + coyote:0, + frog:0, + bear:0, + pig:0, + seal:0, + + lemons:0, + lt3:0, + pres:items.pres, + Mclick:1, + token:0, + } + toClick(); } } - - -// Dark || Light Mode -function LDmodes(){ - let Bimts = document.querySelectorAll('.item'); - if((items.mode||0) == 0){// Light Mode - body.style.background = '#ddd'; - body.style.color = '#000'; - Bimts.forEach((e) => { - e.style.background = '#ffefd5'; - }); - loglm.style.background = '#ffefd5'; - loglm.style.filter = 'drop-shadow(10px 8px 6px #222)'; - }else if(items.mode == 1){// Dark Mode - body.style.background = '#333'; - body.style.color = '#fff'; - Bimts.forEach((e) => { - e.style.background = '#666055'; - }); - loglm.style.background = '#666055'; // effd5f66 - loglm.style.filter = 'drop-shadow(10px 8px 6px #222)'; - } } \ No newline at end of file diff --git a/keybinds.html b/keybinds.html deleted file mode 100644 index bc31c3e..0000000 --- a/keybinds.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - Document - - - -
    - - - - - - - - - - - - - - - - -
    - - - - \ No newline at end of file