Advertisement
Golosomie

datmod vC

Feb 10th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3. A GAME Mod by Hitler
  4.  
  5.   javascript:var s=document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='//pastebin.com/raw.php?i=HALDOL';void(0);
  6.  
  7. */
  8.  
  9. 'use strict';
  10. function Mod(){
  11.     jQuery.fn.outerHTML = function(s) { return s ? this.before(s).remove() : jQuery("<p>").append(this.eq(0).clone()).html(); };
  12.     // DISPLAY STUFF
  13.     document.getElementById("employment").style['margin-top'] = "0px";
  14.     document.getElementsByName("items_holder")[0].style['margin-bottom'] = "0px";
  15.     //document.getElementById("lawmaker_upgrade_box").style.display = "none";
  16.     $('div[id="upgrades_container"]').hide();  //////--------- remove at prestiging
  17.     $('td[colspan="4"]').hide();
  18.     var css = document.createElement("style");
  19.     css.type = "text/css";
  20.     css.innerHTML = "span[name=attackedSpan] { pointer-events: none; }";
  21.     document.body.appendChild(css);
  22.     // VARS
  23.     this.mg = 50000000000000*Math.pow(10,game.prestige);
  24.     this.moneyGoal = this.mg;
  25.     this.oldROPM = 0;
  26.     this.oldMoney = 0;
  27.     this.eff = 1;
  28.     this.buyBCscnts = false;
  29.     this.orePrice = [50,3,7,30,120,240,2250,3250,7000]
  30.     this.GBstate = 7; // 0 = GBwait 1 = GBopen 2=GBlobby 3 = 3=GBrunning
  31.     this.RBstate = 0;  // 2 = RBcd  1 = RBwait 0 = RBgo 3 = lolwas
  32.     this.getProds = false;
  33.     this.buystr = "";
  34.     this.wstr = "";
  35.     this.ItemString = "";
  36.     this.refreshstr = "";
  37.     this.raidTarget = "";
  38.     this.workstr = "";
  39.     this.buildstr = "";
  40.     this.pickMoney = 15590884;
  41.     this.mapActive = (game.adventure.stage > 0);
  42.     // FETCHED INFO
  43.     this.oreTable = $('td[name="oresMined"]>span[class="ore"]');
  44.     this.chicks = $('tr[name="chickenfarmer"]').length;
  45.     this.w = (5 + this.chicks);
  46.     this.limits= [1000,900,800,700,600];
  47.     this.price= [1500*(1+0.1*game.prestige),7500*(1+0.1*game.prestige),25000*(1+0.1*game.prestige),100000*(1+0.1*game.prestige),2500000*(1+0.1*game.prestige),7500000*(1+0.1*game.prestige)];
  48.     this.oreLimit = [[0,2],[3,8],[9,14],[15,21],[22,29],[30,38]];
  49.     this.prods= [106*(1+game.prestige/20),340*(1+game.prestige/20),1105*(1+game.prestige/20),8984*(1+game.prestige/20),23991*(1+game.prestige/20),35377*(1+game.prestige/20)];
  50.     if(this.chicks){
  51.         this.limits.push(600);
  52.         this.price.push(7500000000*(1+0.1*game.prestige));
  53.         this.oreLimit.push([39,47]);
  54.         this.prods.push(106389*(1+game.prestige/20));
  55.     }
  56.     this.oreLimit.push([39+9*this.chicks,47+9*this.chicks],[48+9*this.chicks,56+9*this.chicks]);
  57.     this.prods.push(35377*(1+game.prestige/20),38665*(1+game.prestige/20));
  58.     // TIMERS
  59.     this.timers = {
  60.         update: false,
  61.         lobby: 0,
  62.     };
  63.     // Updater
  64.     this.timers.update = setInterval(function(){ this.update(); }.bind(this), 100);
  65.     // Elements
  66.     this.elements = {
  67.         aboutBox: $('<div style="float:left;width:250px"><h4><div style="display:inline-block;margin-left:3px;vertical-align:top;"></div><div id="mod"></div></h4></div>'),
  68.     };
  69.     $('<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js">').appendTo('body')
  70.     $('#gamecontainer').prepend(this.elements.aboutBox);
  71. }
  72.  
  73. Mod.prototype.checkProd = function(){
  74.     this.getProds = true;
  75.     this.oreTable = $('td[name="oresMined"]>span[class="ore"]');
  76.     this.update();
  77. }
  78. Mod.prototype.update = function(){
  79.     if("undefined" === typeof _) return;
  80.     //if(this.getProds){
  81.     //  var tempTable = $('td[name="oresMined"]>span[class="ore"]');
  82.     //  if((tempTable[0].innerHTML!=this.oreTable[0].innerHTML)&&(tempTable[this.oreTable.length-1].innerHTML!=this.oreTable[this.oreTable.length-1].innerHTML)){
  83.     //      this.getProds = false;
  84.     //      this.calcProds(tempTable,this.oreTable);
  85.     //  }
  86.     //}
  87.     //var C = parseInt($('td[id="money_display"]').text().replace(/,/g,'').replace('$',''));
  88.     //var d = C-this.money;
  89.     //   if(d != 0){
  90.     //          this.money = C;
  91.     //          //console.log(new Date(+new Date+1000*this.frarf().t).toGMTString());
  92.     //  }
  93.     if(game.money != this.oldMoney){
  94.         this.oldMoney = game.money;
  95.         this.updateStats();
  96.         this.updateInventory();
  97.         this.updateTitle();
  98.     }
  99. }
  100. Mod.prototype.o = function(){
  101.     console.log(game.money-this.oldMoney);
  102.     this.oldMoney = game.money;
  103. }
  104. Mod.prototype.calcProds = function(t2,t1){
  105.     var tempProds = [];
  106.     tempProds.length = this.oreLimit.length;
  107.     for(var i = 0; i<tempProds.length; i++){
  108.         var tempWorkerProd = 0;
  109.         for(var ore = this.oreLimit[i][1]; ore >= this.oreLimit[i][0]; ore--){
  110.             var oret2 = parseInt(t2[ore].innerHTML.slice(t2[ore].innerHTML.indexOf('x')+1,1337).replace(/,/g,""));
  111.             var oret1 = parseInt(t1[ore].innerHTML.slice(t1[ore].innerHTML.indexOf('x')+1,1337).replace(/,/g,""));
  112.             tempWorkerProd += this.orePrice[this.oreLimit[i][1]-ore]*(oret2-oret1);
  113.         }
  114.         tempProds[i] = tempWorkerProd/parseInt($('span[name="owned"]')[i].innerHTML.split(" ")[0]);
  115.     }
  116.     this.prods = tempProds;
  117. }
  118.  
  119. Mod.prototype.ev = function(L){
  120.     var ret = 0;
  121.     for(var i = 0; i < L.length; i++){
  122.         ret += (L[i] * this.prods[i])
  123.     }
  124.     return ret;
  125. }
  126. Mod.prototype.m = function(a){
  127.     if (a==8) {
  128.         this.moneyGoal = this.mg;
  129.     } else {
  130.         this.moneyGoal = this.price[a] * (Math.pow(1.025, parseInt($('span[name="owned"]')[a].innerHTML.split(" ")[0])))/this.hasCL();
  131.     }
  132. }
  133. Mod.prototype.hasCL = function(){
  134.         var re = 1;
  135.         for(var i = 0; i < $('span[name="item_details"]').length; i++){
  136.                 if($('span[name="item_details"]')[i].innerHTML.indexOf("Cheap Labor")>-1) {
  137.                         re = 2;
  138.                         break;
  139.                 }
  140.         }
  141.         return re;
  142. }
  143. Mod.prototype.z = function(){
  144.     return (parseInt($('td[id="money_display"]').text().replace(/,/g,'').replace('$',''))/this.moneyGoal);
  145. }
  146. Mod.prototype.frarf = function(){
  147.     var scnts = (game.scientists+game.scientistsBC);
  148.     var S = (1000*game.workerOPMResearch/(game.scientistTime*scnts));
  149.     var r = Math.round(parseInt($('div[class="bar"]>span')[0].style['width'].replace(/%/g,""))*S/100);
  150.     S = Math.ceil(S);
  151.     if(r == S) {r -= 1; }
  152.     var W = [];
  153.     for(var i = 0; i < (8 + this.chicks); i++){
  154.         W.push(parseInt($('span[name="owned"]')[i].innerHTML));
  155.     }
  156.     return this.timeUntil(game.money,this.mg,game.workerOPMResearch,r,S,W,this.w);
  157. }
  158. Mod.prototype.timeUntil = function(C,G,E,r,S,W,hW){
  159.     var ret = {m:0, t:0, w:[]};
  160.     if(G > C){
  161.         var x = this.reach(G-C,E,r,S,this.ev(W));
  162.         ret.t = x.t+1;
  163.         ret.m = x.m;
  164.         var iT = 0, iW, iP, ibW, y, iM, ibT = ret.t;
  165.         for(var i = hW; i>= 0; i--){
  166.             if(W[i]<this.limits[i]){
  167.                 iW = W.slice();
  168.                 iP = this.price[i] * Math.pow(1.025,iW[i]);
  169.                 iW[i] += 1;
  170.                 if(C >= iP){
  171.                     y = this.reach(iP+G-C,E,r,S,this.ev(iW));
  172.                     if(y.t < ibT){
  173.                         ibW = i;
  174.                         ibT = y.t;
  175.                         iM = iP;
  176.                     }
  177.                 } else {
  178.                     var z = this.timeUntil(C,iP,E,r,S,W,hW-1);
  179.                     y = this.reach(G+iP-(C+z.m),E + Math.floor((r+z.t)/S),(r+z.t)%S,S,this.ev(iW));
  180.                     if((z.t+y.t) < ibT){
  181.                         ibW = i;
  182.                         ibT = z.t+y.t;
  183.                         iT = z.t;
  184.                         iM = iP - z.m;
  185.                     }
  186.                 }
  187.             }
  188.         }
  189.         if(ibW != undefined){
  190.             var golo = W.slice();
  191.             golo[ibW] += 1;
  192.             ret = this.timeUntil(C-iM,G,E+Math.floor((r+iT)/S),(r+z.t)%S,S,golo,hW);
  193.             ret.t += iT;
  194.             ret.m -= iM;
  195.             ret.w.unshift(ibW);
  196.         }
  197.     }
  198.     return ret;
  199. }
  200. Mod.prototype.reach = function(M,E,r,S,B){
  201.     var ret = {t: 0, m: 0};
  202.     var t = 0;
  203.     var mg = 0;
  204.     r = S - r;
  205.     var PRi = r * (B+this.pickMoney) - 75000000;
  206.     B = B/(1+E/50);
  207.     if(PRi >= M){
  208.         ret.t = Math.Ceil(r * (M/PRi));
  209.         ret.m = PRi * (ret.t / r);
  210.     } else {
  211.         t = r;
  212.         mg = PRi;
  213.         var Y = (S * (E + 50.5) + (50 / B) * (S * this.pickMoney - 75000000));
  214.         var D = 100 * (M - mg) * (S/B);
  215.         var tq = Math.floor(Math.pow((Y*Y+D),0.5) - Y);
  216.         t += tq;
  217.         mg += tq*(tq+2*Y)*B/(100*S);
  218.         E += tq/S;
  219.         var tr = Math.ceil((M - mg) / ((1 + E/50)*B+this.pickMoney));
  220.         ret.m = mg + tr * ((1+E/50)*B+this.pickMoney);
  221.         ret.t = t + tr;
  222.     }
  223.     return ret;
  224. }
  225. Mod.prototype.updateStats = function(){
  226.     var vil = game.villages[game.currentVillage];
  227.     var demo = (vil.setup.gov == "democracy");
  228.     var efffact = (Math.pow(1.01,Math.min((1+demo)*vil.buildings.house,vil.buildings.library))-1)*(vil.setup.happiness/100) + 1;
  229.     var fontstr = "";
  230.     var fontstr2 = "";
  231.     for(var i = 0; i < $('span[name="item_details"]').length; i++){
  232.         if(($('span[name="item_details"]')[i].innerHTML.indexOf("Research Boost")>-1) && ($('span[name="item_details"]')[i].innerHTML.indexOf("activate")==-1)) {
  233.             efffact *= 2;
  234.             fontstr = "<font color='#00FF00'>";
  235.             fontstr2 = "</font>";
  236.         }else if(($('span[name="item_details"]')[i].innerHTML.indexOf("Diminishing Research")>-1) && ($('span[name="item_details"]')[i].innerHTML.indexOf("activate")==-1)) {
  237.             efffact *= 2;
  238.             fontstr = "<font color='#00FF00'>";
  239.             fontstr2 = "</font>";
  240.         }
  241.     }
  242.     var scnts = (game.scientists+game.scientistsBC)*efffact;
  243.     var ropm = game.workerOPMResearch;
  244.     if (ropm>this.oldROPM) {
  245.         this.oldROPM = ropm;
  246.         //this.checkProd();
  247.     }
  248.     var bossCurrency = Math.floor(game.bossCurrency)/(3-this.hasCL());
  249.     this.eff = 1000*ropm/(game.scientistTime*scnts);
  250.     var buy = Math.ceil((Math.ceil(scnts*(this.eff/Math.floor(this.eff)-1)) - bossCurrency)/efffact);
  251.     var rtime = Math.floor((Math.floor(game.scientistTime * scnts * Math.ceil(this.eff) / 1000) - ropm) * Math.ceil(this.eff) / 60);
  252.     var sas = 1000/(Math.floor(this.eff)*Math.ceil(this.eff)*game.scientistTime*efffact);
  253.     var suus = (sas>=0.75) ? "NEVAR!" : Math.ceil(10*buy/(3600*(0.75-sas)))/10+"h";
  254.     if(((buy<-133.7)||(this.hasActive("cheap_labor")&&(bossCurrency>0)))&&this.buyBCscnts) {
  255.         this.buystr = ">";
  256.         document.getElementById("mod").innerHTML = "<br><br>" + fontstr + "eff: " + Math.round(100000*this.eff)/100000 + "s<br>" + fontstr2 + "<font color='#FF0000'>" + rtime + "min<br>KAUF MIT BC</font><br>"+Math.round(140*sas)+"% / d<br>"+this.wstr;
  257.     }else{
  258.         this.buystr = "";
  259.         document.getElementById("mod").innerHTML = "<br><br>" + fontstr + "eff: " + Math.round(100000*this.eff)/100000 + "s<br>" + fontstr2 + rtime + "min<br>"+buy+" - "+suus+"<br>"+Math.round(140*sas)+"% / d<br>"+this.wstr;
  260.     }
  261. }
  262. Mod.prototype.updateInventory = function(){
  263.     this.ItemString = "";
  264.     var items_activate = false;
  265.     var items_delete = false;
  266.     var dels = 0;
  267.  
  268.     var colorItems = $('span[name="item_details"][style*="rgb"]')
  269.     for(var i = 0; i < colorItems.length; i++){
  270.         colorItems[i].style.background = "";
  271.     }
  272.     for(var i = 0; i < game.inventory.length; i++){
  273.         if(game.inventory[i].item == "diminishing_research" && !game.inventory[i].activated){
  274.             if(this.hasActive(game.inventory[i].item)){ dels++;}
  275.             items_activate = true;
  276.             $('span[name="item_details"]')[i].style.background = "rgb(88, 255, 88)";
  277.         } else if(game.inventory[i].item == "speed_research" && !game.inventory[i].activated){
  278.             if(this.hasActive(game.inventory[i].item)){ dels++;}
  279.             items_activate = true;
  280.             $('span[name="item_details"]')[i].style.background = "rgb(88, 255, 88)";
  281.         } else if(game.inventory[i].item == "map" && game.inventory[i].activated){
  282.             dels++;
  283.             items_activate = true;
  284.             $('span[name="item_details"]')[i].style.background = "rgb(88, 255, 88)";
  285.         } else if(game.inventory[i].item == "godspear_fragment" && game.bossScenario.active && !this.hasActive("godspear_fragment")){
  286.             items_activate = true;
  287.             $('span[name="item_details"]')[i].style.background = "rgb(88, 255, 88)";
  288.         } else if(game.inventory[i].item == "double_exp"){
  289.             dels++;
  290.             items_delete = true;
  291.             $('span[name="item_details"]')[i].style.background = "rgb(255, 88, 88)";
  292.         }
  293.         if(game.inventory[i].activated){
  294.             $('button[name*="dropitem"]')[i].innerHTML = game.inventory[i].life/1000;
  295.         }
  296.     }
  297.     var rest = game.inventory.length-dels;
  298.     if(rest > 26){
  299.         var fall_a = rest +1 - $('span[name="item_details"]:contains("Godspear")').length;
  300.         var fall_b = fall_a + 1 - $('span[name="item_details"]:contains("Attack")').length;
  301.         if((fall_a < 27)||(fall_b < 27)){
  302.             if($('span[name="item_details"]:contains("Godspear")').length){
  303.                 rest += (1-this.hasActive("godspear_fragment"));
  304.             }
  305.             for(var i = 0; i < game.inventory.length; i++){
  306.                 if(game.inventory[i].item == "godspear_fragment" && !game.inventory[i].activated){
  307.                     items_activate = true;
  308.                     $('span[name="item_details"]')[i].style.background = "rgb(88, 255, 88)";
  309.                     rest--;
  310.                     if(rest < 27){ break; }
  311.                 }
  312.             }
  313.             if(fall_a>26){
  314.                 if($('span[name="item_details"]:contains("Attack")').length){
  315.                     rest += (1-this.hasActive("attack_boost"));
  316.                 }
  317.                 for(var i = 0; i < game.inventory.length; i++){
  318.                     if(game.inventory[i].item == "attack_boost" && !game.inventory[i].activated){
  319.                         items_activate = true;
  320.                         $('span[name="item_details"]')[i].style.background = "rgb(88, 255, 88)";
  321.                         rest--;
  322.                         if(rest < 27){ break; }
  323.                     }
  324.                 }
  325.             }
  326.         } else {
  327.             for(var i = 0; i < game.inventory.length; i++){
  328.                 if(game.inventory[i].item == "attack_boost"){
  329.                     items_delete = true;
  330.                     $('span[name="item_details"]')[i].style.background = "rgb(255, 88, 88)";
  331.                     rest--;
  332.                 }
  333.             }
  334.             if((fall_b < 28) && ($('span[name="item_details"]:contains("Godspear")').length > 1)){
  335.                 for(var i = 0; i < game.inventory.length; i++){
  336.                     if(game.inventory[i].item == "godspear_fragment" && !game.inventory[i].activated){
  337.                         items_activate = true;
  338.                         $('span[name="item_details"]')[i].style.background = "rgb(88, 255, 88)";
  339.                     }
  340.                 }
  341.             } else {
  342.                 for(var i = 0; i < game.inventory.length; i++){
  343.                     if(game.inventory[i].item == "godspear_fragment"){
  344.                         items_delete = true;
  345.                         $('span[name="item_details"]')[i].style.background = "rgb(255, 88, 88)";
  346.                         rest--;
  347.                     }
  348.                 }
  349.                 if(rest > 26){
  350.                     if($('span[name="item_details"]:contains("Ring")').length){
  351.                         rest += (1-this.hasActive("ring_of_efficiency"));
  352.                     }
  353.                     for(var i = 0; i < game.inventory.length; i++){
  354.                         if(game.inventory[i].item == "ring_of_efficiency" && !game.inventory[i].activated){
  355.                             items_activate = true;
  356.                             $('span[name="item_details"]')[i].style.background = "rgb(88, 255, 88)";
  357.                             rest--;
  358.                             if(rest < 27){
  359.                                 break;
  360.                             }
  361.                         }
  362.                     }
  363.                 }
  364.             }
  365.         }
  366.     }
  367.     if(items_activate && items_delete){
  368.         this.ItemString = "=";
  369.     } else if(items_activate){
  370.         this.ItemString = "+";
  371.     } else if(items_delete){
  372.         this.ItemString = "-";
  373.     }
  374. }
  375. Mod.prototype.updateTitle = function(){
  376.     //RB
  377.     var RBstr = '';
  378.     if(game.bossScenario.active){
  379.         RBstr = "R1";
  380.     }else if($('span[name="timer"][style="font-size: 19px; display: inline;"').length){
  381.         RBstr = "R2";
  382.     } else {
  383.         RBstr = "R0";
  384.     }
  385.     var popupHTML = $('div[id="popup"]')[0].innerHTML;
  386.     //GB
  387.     if($('img[name="globalBossImg"]:visible').length){
  388.         this.GBstate = 3;
  389.     } else if ($('img[src="game/img/icons/globalBoss_big.png"]:visible').length){
  390.         this.GBstate = 2;
  391.     } else if (($('span[name="timeRemaining"]').text()==("JOINTHE FIGHT"))&&((this.GBstate==2)||(this.GBstate==0))){
  392.         if(this.GBstate==0){this.timers.lobby = +new Date;}
  393.         this.GBstate = 1;
  394.     } else if (($('span[name="timeRemaining"]').text().indexOf("min")>-1)||($('span[name="timeRemaining"]').text().indexOf("sec")>-1)){
  395.         this.GBstate = 0;
  396.     } else if ((popupHTML.indexOf("You cannot join the event lobby")>-1)||((this.GBstate>0)&&(this.GBstate<5)&&((+new Date-this.timers.lobby)>61000))){
  397.         this.GBstate = 6;
  398.     }
  399.     var GBstr = '';
  400.     if(this.GBstate==0){
  401.         GBstr = 'G0';
  402.     }else if(this.GBstate==1){
  403.         GBstr = 'G1';
  404.         if((+new Date-this.timers.lobby)>50000){GBstr='G3';}
  405.     }else if(this.GBstate==2){
  406.         GBstr = 'G2';
  407.         if((+new Date-this.timers.lobby)>50000){GBstr='G4';}
  408.     }else if(this.GBstate==3){
  409.         GBstr = 'G5';
  410.     }else if(this.GBstate==7){
  411.         GBstr = 'G7';
  412.     }else if(this.GBstate==6){
  413.         GBstr = 'G6';
  414.     }
  415.  
  416.     //raiding
  417.     var raidstr = '';
  418.     /*if($('span[name="raidtime"]')[0].innerHTML==""){
  419.         if(this.raidTarget==""){
  420.             raidstr = "?";
  421.         } else {
  422.             raidstr = "_";
  423.         }
  424.     }
  425.     */
  426.     //popup
  427.     var popupstr = '';
  428.     if($('div[id="popup"]:visible').length==1){
  429.         if((popupHTML.indexOf("Raid report")>-1)||(popupHTML.indexOf("Chikolio")>-1)){
  430.             popupstr = '~' + popupHTML.slice(popupHTML.indexOf("You"),popupHTML.indexOf("</div>")).trim();
  431.         } else {
  432.             if((popupHTML.indexOf("What user do you want to raid")>-1)&&($('input[name="raid_user"]')[0].value!=this.raidTarget)&&(this.raidTarget!="")){
  433.                 $('input[name="raid_user"]')[0].value = this.raidTarget;
  434.             }
  435.         }
  436.     }
  437.     //map
  438.     var mapstr = '';
  439.     if(game.adventure.reward > 0){
  440.         this.mapActive = true;
  441.         if(game.adventure.reward > 2){
  442.         mapstr = 'MV';
  443.         }else{
  444.         mapstr = 'MS';
  445.         }
  446.     }else if(game.adventure.stage > 0){
  447.         this.mapActive = true;
  448.         mapstr = 'M1';
  449.     }else{
  450.         this.mapActive = false;
  451.         var hasMap = false;
  452.         for(var i = 0; i < game.inventory.length; i++){
  453.             if(game.inventory[i].item == "map"){
  454.                 hasMap = true;
  455.                 break;
  456.             }
  457.         }
  458.         mapstr = hasMap ? 'M0' : 'Mx';
  459.     }
  460.     window.document.title = this.ItemString + "|" + this.workstr + this.buystr + GBstr + raidstr + RBstr + popupstr + mapstr + '| A GAME';
  461. }
  462. Mod.prototype.hasActive = function(item){
  463.     for(var i = 0; i<game.inventory.length; i++){
  464.         if(game.inventory[i].item == item && game.inventory[i].activated){
  465.             return true;
  466.         }
  467.     }
  468.     return false;
  469. }
  470. Mod.prototype.terminate = function(){
  471.         _.each(this.elements, function(element){
  472.                 if(_.isArray(element)){
  473.                         _.each(element, function(el){ el.remove(); });
  474.                 }else{
  475.                         element.remove();
  476.                 }
  477.         });
  478.         clearInterval(this.timers.update);
  479.         window.m = undefined;
  480. }
  481. Mod.prototype.getKeks = function(name){
  482.     var parts = document.cookie.split(name + "=");
  483.     if(parts.length == 2){
  484.         return parts.pop().split(";").shift();
  485.     }
  486.     return false;
  487. }
  488. Mod.prototype.setKeks = function(Bezeichner,Wert){
  489.     var expire = (new Date(Math.pow(13,11))).toGMTString();
  490.     document.cookie=Bezeichner+"="+Wert+";expires="+expire+";";
  491. }
  492. // Start
  493. if(window.m) window.m.terminate();
  494. window.m = new Mod();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement