Player Progression Tracker

Stores player attributes for the Deeproute.com online football game

  1. // ==UserScript==
  2. // @name Player Progression Tracker
  3. // @namespace Deep Route
  4. // @author Triplex
  5. // @version 1.5
  6. // @description Stores player attributes for the Deeproute.com online football game
  7. // @grant GM_getValue
  8. // @grant GM_setValue
  9. // @include http://deeproute.com/default.asp?js=oneplayer&lookatplayer=*&leagueno=*
  10. // @include http://deeproute.com/default.asp?js=oneplayer&lookatplayer=*&myleagueno=*
  11. // @include http://deeproute.com/?js=oneplayer&lookatplayer=*&leagueno=*
  12. // @include http://deeproute.com/?js=oneplayer&lookatplayer=*&myleagueno=*
  13. // @include http://deeproute.com/default.asp?js=rosters&myleagueno=*&myteamno=*
  14. // @include http://deeproute.com/?js=rosters&myleagueno=*&myteamno=*
  15. // @include http://deeproute.com/?js=oneplayer&leagueno=*&lookatplayer=*
  16. // @include http://deeproute.com/?js=oneplayer&myleagueno=*&lookatplayer=*
  17. // @include http://deeproute.com/default.asp?js=oneplayer&leagueno=*&lookatplayer=*
  18. // ==/UserScript==
  19.  
  20. var prefix="DR_progress";
  21. var run=0, attr=[], attrstr="", lgno=0, playerid=0, curryear=-1, counter=0, pidlist=[];
  22.  
  23. function addtr(intable, incol, isBold) {
  24.  
  25. var tr1 = document.createElement("tr"), color;
  26. intable.appendChild(tr1);
  27.  
  28. if (counter++%2===0) {
  29. color='#FFFFDD';
  30. }
  31. else {
  32. color='#EEFFFF';
  33. }
  34.  
  35. for (var x=0; x<incol.length; x++) {
  36.  
  37. var td1 = document.createElement("td");
  38. td1.setAttribute('align','center');
  39. var newDiv = document.createElement('div');
  40. newDiv.innerHTML=incol[x];
  41. td1.appendChild(newDiv);
  42. if (isBold || x===0) {
  43. td1.setAttribute('style', 'font-weight: bold;');
  44. }
  45. td1.setAttribute('bgcolor', color);
  46.  
  47. tr1.appendChild(td1);
  48. }
  49.  
  50. }
  51.  
  52.  
  53. function parseData(instr) {
  54.  
  55. var ptr1=0, ptr2, ptr3, year, str1;
  56.  
  57. alldata=[];
  58.  
  59. while (1) {
  60. ptr2=instr.indexOf(":", ptr1);
  61. ptr3=instr.indexOf(".", ptr2+1);
  62. if (ptr2<0 || ptr3<0) {
  63. break;
  64. }
  65. var tmp=new Array (1);
  66. year=parseInt(instr.substring(ptr1, ptr2));
  67. str1=instr.substring(ptr2+1, ptr3);
  68. ptr1=ptr3+1;
  69. tmp[0]=year;
  70.  
  71. for (var x=0; x<str1.length; x+=2) {
  72. ptr2=str1.substring(x, x+2);
  73. if (ptr2.substring(0, 1) == '0') {
  74. ptr3=ptr2.substring(1, 2);
  75. ptr2=ptr3;
  76. }
  77. tmp[tmp.length]=parseInt(ptr2);
  78. }
  79.  
  80. alldata[alldata.length]=tmp;
  81. }
  82.  
  83.  
  84. for (var x=0; x<alldata.length; x++) {
  85. for (var y=x+1; y<alldata.length; y++) {
  86. if (alldata[x][0] > alldata[y][0]) {
  87. var tmp0=alldata[x];
  88. alldata[x]=alldata[y];
  89. alldata[y]=tmp0;
  90. }
  91. }
  92. }
  93.  
  94. }
  95.  
  96. function constructCols(inname, index1, index2) {
  97.  
  98. var cols=[];
  99. cols[0]=inname;
  100.  
  101. var gainStyling = "style='font-weight: bold; color: DarkGreen'";
  102. var lossStyling = "style='font-weight: bold; color: DarkRed'";
  103.  
  104. for (var x=0; x<alldata.length; x++) {
  105. var cell = (alldata[x][index1]).toString() + "/" + (alldata[x][index2]).toString();
  106. if (x > 0) {
  107. var curDelta;
  108. var potDelta;
  109. var currentDeltaInt = alldata[x][index1] - alldata[x-1][index1];
  110. var potentialDeltaInt = alldata[x][index2] - alldata[x-1][index2];
  111.  
  112. if (currentDeltaInt < 0) {
  113. curDelta = "<span class='attLoss' " + lossStyling + ">" + currentDeltaInt.toString() + "</span>";
  114. }
  115. else if (currentDeltaInt > 0) {
  116. curDelta = "<span class='attGain' " + gainStyling + ">+" + currentDeltaInt.toString() + "</span>";
  117. }
  118. else {
  119. curDelta = "+" + currentDeltaInt.toString();
  120. }
  121.  
  122. if (potentialDeltaInt < 0) {
  123. potDelta = "<span class='potentialLoss' " + lossStyling + ">" + potentialDeltaInt.toString() + "</span>";
  124. }
  125. else if (potentialDeltaInt > 0) {
  126. potDelta = "<span class='potentialGain' " + gainStyling + ">+" + potentialDeltaInt.toString() + "</span>";
  127. }
  128. else {
  129. potDelta = "+" + potentialDeltaInt.toString();
  130. }
  131.  
  132. cell = cell.concat("<span class='delta" + x + "' style='display: none'> (" + curDelta + "/" + potDelta + ")</span>");
  133. }
  134. cols[x+1]=cell;
  135. }
  136.  
  137. // compare current atts to the last column of historical atts
  138. var curCell = (attr[index1-1]).toString() + "/" + (attr[index2-1]).toString();
  139. var lastIndex = alldata.length - 1;
  140. var curDelta;
  141. var potDelta;
  142. var currentDeltaInt = attr[index1-1] - alldata[lastIndex][index1];
  143. var potentialDeltaInt = attr[index2-1] - alldata[lastIndex][index2];
  144.  
  145. if (currentDeltaInt < 0) {
  146. curDelta = "<span class='attLoss' " + lossStyling + ">" + currentDeltaInt.toString() + "</span>";
  147. }
  148. else if (currentDeltaInt > 0) {
  149. curDelta = "<span class='attGain' " + gainStyling + ">+" + currentDeltaInt.toString() + "</span>";
  150. }
  151. else {
  152. curDelta = "+" + currentDeltaInt.toString();
  153. }
  154.  
  155. if (potentialDeltaInt < 0) {
  156. potDelta = "<span class='potentialLoss' " + lossStyling + ">" + potentialDeltaInt.toString() + "</span>";
  157. }
  158. else if (potentialDeltaInt > 0) {
  159. potDelta = "<span class='potentialGain' " + gainStyling + ">+" + potentialDeltaInt.toString() + "</span>";
  160. }
  161. else {
  162. potDelta = "+" + potentialDeltaInt.toString();
  163. }
  164.  
  165. curCell = curCell.concat("<span class='delta" + x + "' style='display: none'> (" + curDelta + "/" + potDelta + ")</span>");
  166.  
  167. cols[cols.length] = curCell;
  168. return cols;
  169. }
  170.  
  171.  
  172. function print_progression() {
  173.  
  174. var indexstr=prefix+"_"+lgno+"_"+playerid;
  175. var storedata=GM_getValue(indexstr, null);
  176. var divptr=document.getElementById("progress_mesg"), cols;
  177.  
  178. if (storedata===null || storedata=="deleted") {
  179. divptr.innerHTML="No historical data is saved previously or data of this player is deleted";
  180. }
  181. else if (run==1) {
  182. run=2;
  183. document.getElementById("print_progression").setAttribute("value", "Show Progression");
  184. document.getElementById("combine table").style.display = "none";
  185. document.getElementById("progress_mesg").style.visibility = "hidden";
  186. //divptr.innerHTML="Progression table is displayed already";
  187. }
  188. else if (run==2) {
  189. run=1;
  190. // make existant table visible
  191. document.getElementById("print_progression").setAttribute("value", "Hide Progression");
  192. document.getElementById("combine table").style.display = "table";
  193. document.getElementById("progress_mesg").style.visibility = "visible";
  194. }
  195. else {
  196.  
  197. run=1;
  198. parseData(storedata);
  199.  
  200. var outtable = document.createElement("table");
  201. outtable.setAttribute("border","1");
  202. outtable.setAttribute("cellspacing","0");
  203. outtable.setAttribute('style','width: 100%; table-layout: fixed');
  204. outtable.setAttribute('id',"combine table");
  205.  
  206. cols=[];
  207. cols[0]="Season";
  208. for (var x=0; x<alldata.length; x++) {
  209. if (x === 0) {
  210. cols[x+1]=alldata[x][0];
  211. }
  212. else {
  213. cols[x+1]=alldata[x][0] + " " + addShowHideButtons(x);
  214. }
  215. }
  216. cols[cols.length]="Current " + addShowHideButtons(cols.length - 1);
  217.  
  218. addtr(outtable, cols, 1);
  219. addtr(outtable, constructCols("Overall", 187, 188) ,0);
  220. addtr(outtable, constructCols("Strength/Size", 9, 10) ,0);
  221. addtr(outtable, constructCols("Stamina", 49, 50) ,0);
  222. addtr(outtable, constructCols("Toughness", 51, 52) ,0);
  223. addtr(outtable, constructCols("Athleticism", 57, 58) ,0);
  224. addtr(outtable, constructCols("Intelligence", 11, 12) ,0);
  225. addtr(outtable, constructCols("Leadership", 13, 14) ,0);
  226. addtr(outtable, constructCols("Discipline", 27, 28) ,0);
  227. addtr(outtable, constructCols("Clutch", 23, 24) ,0);
  228. addtr(outtable, constructCols("Consistency", 53, 54) ,0);
  229. addtr(outtable, constructCols("Passing Arm", 1, 2) ,0);
  230. addtr(outtable, constructCols("Passing Accuracy", 3, 4) ,0);
  231. addtr(outtable, constructCols("Handle Snap", 63, 64) ,0);
  232. addtr(outtable, constructCols("Escapability", 5, 6) ,0);
  233. addtr(outtable, constructCols("Speed/Size", 33, 34) ,0);
  234. addtr(outtable, constructCols("Footwork", 35, 36) ,0);
  235. addtr(outtable, constructCols("Cover Skills/Size", 81, 82) ,0);
  236. addtr(outtable, constructCols("Protect ball", 37, 38) ,0);
  237. addtr(outtable, constructCols("Shed Blocker", 59, 60) ,0);
  238. addtr(outtable, constructCols("Pass Catching", 15, 16) ,0);
  239. addtr(outtable, constructCols("Route", 17, 18) ,0);
  240. addtr(outtable, constructCols("First Step", 25, 26) ,0);
  241. addtr(outtable, constructCols("Run Blocking", 19, 20) ,0);
  242. addtr(outtable, constructCols("Pass Blocking", 21, 22) ,0);
  243. addtr(outtable, constructCols("Snapping", 61, 62) ,0);
  244. addtr(outtable, constructCols("Motor", 7, 8) ,0);
  245. addtr(outtable, constructCols("Read Opposition", 55, 56) ,0);
  246. addtr(outtable, constructCols("Tackling", 29, 30) ,0);
  247. addtr(outtable, constructCols("Leaping", 31, 32) ,0);
  248. addtr(outtable, constructCols("Feel Pressure", 45, 46) ,0);
  249. addtr(outtable, constructCols("Find Opening", 47, 48) ,0);
  250. addtr(outtable, constructCols("FG Accuracy", 41, 42) ,0);
  251. addtr(outtable, constructCols("Kicking Strength", 39, 40) ,0);
  252. addtr(outtable, constructCols("Punting Accuracy", 43, 44) ,0);
  253.  
  254. divptr.innerHTML="Player Progression:";
  255.  
  256. var divptr=document.getElementById("progress_mesg");
  257. divptr.parentNode.insertBefore(outtable, divptr.nextSibling);
  258. document.getElementById("print_progression").setAttribute("value", "Hide Progression");
  259. }
  260.  
  261. for (var i=1; i<=alldata.length; i++) {
  262. var showButtonName = "showDelta" + i;
  263. var hideButtonName = "hideDelta" + i;
  264. var deltaSpanName = "delta" + i;
  265. var showDeltaButton = document.getElementById(showButtonName);
  266. showDeltaButton.addEventListener("click", showDelta.bind(null, deltaSpanName, showButtonName, hideButtonName), false);
  267.  
  268. var hideDeltaButton = document.getElementById(hideButtonName);
  269. hideDeltaButton.addEventListener("click", hideDelta.bind(null, deltaSpanName, showButtonName, hideButtonName), false);
  270. }
  271. }
  272.  
  273. function save_data() {
  274.  
  275. var indexstr=prefix+"_"+lgno+"_"+playerid;
  276. var storedata=GM_getValue(indexstr, null);
  277.  
  278. if ((storedata===null || storedata=="deleted") && attr!=="" && curryear!=-1) {
  279. GM_setValue(indexstr, curryear.toString()+":"+attrstr+".");
  280. var divptr=document.getElementById("progress_mesg");
  281. divptr.innerHTML="Attributes Saved";
  282. }
  283. else if (curryear!=-1) {
  284. parseData(storedata);
  285. var found=0;
  286. for (var x=0; x<alldata.length; x++) {
  287. if (alldata[x][0] == curryear) {
  288. found=1;
  289. break;
  290. }
  291. }
  292.  
  293. var divptr=document.getElementById("progress_mesg");
  294.  
  295. if (found===0) {
  296. GM_setValue(indexstr, storedata+curryear.toString()+":"+attrstr+".");
  297. divptr.innerHTML="Attributes Saved";
  298. }
  299. else {
  300. divptr.innerHTML="This season's attributes are already saved";
  301. }
  302. }
  303. else {
  304. var divptr=document.getElementById("progress_mesg");
  305. divptr.innerHTML="Save failed: Can't find current year info in the page. Try saving whole team instead";
  306. }
  307. }
  308.  
  309. function save_all() {
  310.  
  311. for (var x=0; x<pidlist.length; x++) {
  312.  
  313. var indexstr=prefix+"_"+lgno+"_"+pidlist[x];
  314. var str1="pattnoinj"+pidlist[x];
  315. var attsptr=document.getElementsByName(str1);
  316. var atts=attsptr[0].value.toString();
  317. var storedata=GM_getValue(indexstr, null);
  318.  
  319. if (storedata===null || storedata=="deleted") {
  320. GM_setValue(indexstr, curryear.toString()+":"+atts+".");
  321. }
  322. else {
  323. parseData(storedata);
  324. var found=0;
  325. for (var y=0; y<alldata.length; y++) {
  326. if (alldata[y][0] == curryear) {
  327. found=1;
  328. break;
  329. }
  330. }
  331.  
  332. if (found===0) {
  333. GM_setValue(indexstr, storedata+curryear.toString()+":"+atts+".");
  334. }
  335. }
  336. }
  337.  
  338. var divptr=document.getElementById("progress_all_mesg");
  339. divptr.innerHTML="Attributes of all players saved";
  340.  
  341. }
  342.  
  343. function delete_all() {
  344.  
  345. var shouldDelete = confirm("are you sure you want to delete all records?");
  346.  
  347. if (shouldDelete === true) {
  348. for (var x=0; x<pidlist.length; x++) {
  349.  
  350. var indexstr=prefix+"_"+lgno+"_"+pidlist[x];
  351. var storedata=GM_getValue(indexstr, null);
  352.  
  353. if (storedata!==null) {
  354. GM_setValue(indexstr, "deleted");
  355. }
  356. }
  357.  
  358. var divptr=document.getElementById("progress_all_mesg");
  359. divptr.innerHTML="Attribuite records deleted";
  360. }
  361.  
  362. }
  363.  
  364. function delete_data() {
  365.  
  366. var shouldDelete = confirm("are you sure you want to delete this player's records?");
  367.  
  368. if (shouldDelete === true) {
  369. var indexstr=prefix+"_"+lgno+"_"+playerid;
  370. GM_setValue(indexstr, "deleted");
  371. var divptr=document.getElementById("progress_mesg");
  372. divptr.innerHTML="Old data deleted";
  373. }
  374. }
  375.  
  376. function addShowHideButtons(x) {
  377. var buttons = "<a id='showDelta" + x + "' title='Display the change in attributes from the previous season' style='display: inline'>(+/-)</a>" +
  378. "<a id='hideDelta" + x + "' title='Hide the change in attributes from the previous season' style='display: none'>(+/-)</a>";
  379. return buttons;
  380. }
  381.  
  382. // hide the difference in attributes from the previous year
  383. function hideDelta(className, showButtonName, hideButtonName) {
  384. var toHide = document.getElementsByClassName(className);
  385. for (var i=0; i<toHide.length; i++) {
  386. toHide[i].style.display = "none";
  387. }
  388. var showDeltaButton = document.getElementById(showButtonName);
  389. showDeltaButton.style.display = "inline";
  390.  
  391. var hideDeltaButton = document.getElementById(hideButtonName);
  392. hideDeltaButton.style.display = "none";
  393. }
  394.  
  395. // show the difference in attributes from the previous year
  396. function showDelta(className, showButtonName, hideButtonName) {
  397. var toShow = document.getElementsByClassName(className);
  398. for (var i=0; i<toShow.length; i++) {
  399. toShow[i].style.display = "inline";
  400. }
  401.  
  402. var showDeltaButton = document.getElementById(showButtonName);
  403. showDeltaButton.style.display = "none";
  404.  
  405. var hideDeltaButton = document.getElementById(hideButtonName);
  406. hideDeltaButton.style.display = "inline";
  407. }
  408.  
  409. window.setTimeout( function() {
  410.  
  411. var url=window.location.toString();
  412.  
  413. if (url.indexOf("oneplayer",0) >= 0) {
  414.  
  415.  
  416. var buttontable = document.createElement('table');
  417. buttontable.setAttribute('cellspacing', '0');
  418. buttontable.setAttribute('cellpadding', '0');
  419. buttontable.setAttribute('id', 'track_table');
  420.  
  421. var newtr=document.createElement('tr');
  422. buttontable.appendChild(newtr);
  423. var newtd1 = document.createElement('td');
  424. newtd1.setAttribute('colspan', '10');
  425. var newDiv2 = document.createElement('div');
  426. newDiv2.align = 'center';
  427. newDiv2.innerHTML = '<input id="print_progression" type="button" style="font-size: 10pt; font-weight: bold; width: 100%; height: 30px" value="Show Progression">';
  428. newDiv2.addEventListener('click', function() { print_progression(); }, true);
  429. newtd1.appendChild(newDiv2);
  430. newtr.appendChild(newtd1);
  431.  
  432. newtd1 = document.createElement('td');
  433. newtd1.setAttribute('colspan', '10');
  434. newDiv2 = document.createElement('div');
  435. newDiv2.align = 'center';
  436. newDiv2.innerHTML = '<input type="button" style="font-size: 10pt; font-weight: bold; width: 100%; height: 30px" value="Save current season\'s Attributes">';
  437. newDiv2.addEventListener('click', function() { save_data(); }, true);
  438. newtd1.appendChild(newDiv2);
  439. newtr.appendChild(newtd1);
  440.  
  441. newtd1 = document.createElement('td');
  442. newtd1.setAttribute('colspan', '10');
  443. newDiv2 = document.createElement('div');
  444. newDiv2.align = 'center';
  445. newDiv2.innerHTML = '<input type="button" style="font-size: 10pt; font-weight: bold; width: 100%; height: 30px" value="Delete saved data">';
  446. newDiv2.addEventListener('click', function() { delete_data(); }, true);
  447. newtd1.appendChild(newDiv2);
  448. newtr.appendChild(newtd1);
  449.  
  450. var newDiv = document.createElement('div');
  451. newDiv.setAttribute("id", "progress_mesg");
  452. newDiv.innerHTML='&nbsp;';
  453.  
  454.  
  455. var target = document.getElementById('hili1');
  456. if (target) {
  457.  
  458. target.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.insertBefore(
  459. newDiv, target.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling);
  460.  
  461.  
  462. target.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.insertBefore(
  463. buttontable, target.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling);
  464. }
  465.  
  466. var ptr1, ptr2, ptr3, input=document.body.innerHTML, lgptr=document.getElementById("mylgno"), yearptr=document.getElementById("hiyear");
  467.  
  468. if (lgptr!==null) lgno=lgptr.value;
  469. var yearptr1=document.getElementById("thisyear");
  470. if (yearptr1!==null) curryear=parseInt(yearptr1.value);
  471. else {
  472. if (yearptr!==null) {
  473. curryear=parseInt(yearptr.value);
  474. if (curryear<10) {
  475. curryear=-1;
  476. }
  477. }
  478. }
  479.  
  480. ptr1=input.indexOf("by Game Stats");
  481. if (ptr1>=0) {
  482. ptr2=input.lastIndexOf("\">", ptr1);
  483. ptr3=input.lastIndexOf("lookatplayer=", ptr1);
  484. if (ptr3>=0 && ptr2>ptr3) {
  485. playerid=parseInt(input.substring(ptr3+13, ptr2));
  486. }
  487. }
  488.  
  489. ptr1=input.indexOf("attsnoinj", 0);
  490. attrstr="";
  491.  
  492. if (ptr1>=0) {
  493. ptr2=input.indexOf("value=\"", ptr1);
  494. ptr3=input.indexOf("\"", ptr2+7);
  495. if (ptr2>=0 && ptr3>ptr2) {
  496.  
  497. attrstr=input.substring(ptr2+7, ptr3);
  498.  
  499. for (var x=0; x<attrstr.length; x+=2) {
  500. ptr1=attrstr.substring(x, x+2);
  501. if (ptr1.substring(0, 1) == '0') {
  502. ptr2=ptr1.substring(1, 2);
  503. ptr1=ptr2;
  504. }
  505. attr[attr.length]=parseInt(ptr1);
  506. }
  507. }
  508. }
  509. }
  510. else if (url.indexOf("rosters",0) >= 0) {
  511.  
  512. var lgptr=document.getElementById("mylgno"), pids=document.getElementsByName("pid"), yearptr=document.getElementById("myseason");
  513. var currptr=0, ptr1, ptr2, str1;
  514.  
  515. if (lgptr!==null) lgno=lgptr.value;
  516. if (yearptr!==null) curryear=parseInt(yearptr.value);
  517.  
  518. str1=(pids[0].value).toString();
  519.  
  520. while (1) {
  521. ptr1=str1.indexOf("!", currptr);
  522. ptr2=str1.indexOf(" ", ptr1+1);
  523. if (ptr1<0 || ptr2<0) {
  524. break;
  525. }
  526. pidlist[pidlist.length]=parseInt(str1.substring(ptr1+1, ptr2));
  527. currptr=ptr2;
  528. }
  529.  
  530. var buttontable = document.createElement('table');
  531. buttontable.setAttribute('cellspacing', '0');
  532. buttontable.setAttribute('cellpadding', '0');
  533. buttontable.setAttribute('id', 'track_table');
  534.  
  535. var newtr=document.createElement('tr');
  536. buttontable.appendChild(newtr);
  537. var newtd1 = document.createElement('td');
  538. newtd1.setAttribute('colspan', '10');
  539. var newDiv2 = document.createElement('div');
  540. newDiv2.align = 'center';
  541. newDiv2.innerHTML = '<input type="button" style="font-size: 10pt; font-weight: bold; width: 100%; height: 30px" value="Record all players\' attributes">';
  542. newDiv2.addEventListener('click', function() { save_all(); }, true);
  543. newtd1.appendChild(newDiv2);
  544. newtr.appendChild(newtd1);
  545.  
  546. newtr=document.createElement('tr');
  547. buttontable.appendChild(newtr);
  548. newtd1 = document.createElement('td');
  549. newtd1.setAttribute('colspan', '10');
  550. newDiv2 = document.createElement('div');
  551. newDiv2.align = 'center';
  552. newDiv2.innerHTML = '<input type="button" style="font-size: 10pt; font-weight: bold; width: 100%; height: 30px" value="Delete all players\' records">';
  553. newDiv2.addEventListener('click', function() { delete_all(); }, true);
  554. newtd1.appendChild(newDiv2);
  555. newtr.appendChild(newtd1);
  556.  
  557. var newDiv = document.createElement('div');
  558. newDiv.setAttribute("id", "progress_all_mesg");
  559. newDiv.innerHTML='&nbsp;';
  560.  
  561. var target = document.getElementById('storeme');
  562.  
  563. if (target) {
  564.  
  565. target.parentNode.parentNode.parentNode.parentNode.parentNode.insertBefore(newDiv,
  566. target.parentNode.parentNode.parentNode.parentNode.nextSibling);
  567.  
  568. target.parentNode.parentNode.parentNode.parentNode.parentNode.insertBefore(buttontable,
  569. target.parentNode.parentNode.parentNode.parentNode.nextSibling);
  570. }
  571. }
  572.  
  573.  
  574.  
  575. }, 200);