adroller.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. document.addEventListener("DOMContentLoaded", function(event) {
  2. var ads = {
  3. "lrc": {
  4. "url": "https://lewrockwell.com",
  5. "title": "Lew Rockwell",
  6. "img": "lrc.png",
  7. "alt": "LewRockwell.com: Embrace Liberty; Opt Out of the State"
  8. },
  9. "ernie": {
  10. "url": "https://freedomsphoenix.com",
  11. "title": "Freedom's Phoenix",
  12. "img": "ffenix.png",
  13. "alt": "Freedom's Phoenix: Uncovering the Secrets, Exposing the Lies"
  14. },
  15. // The feens are done RIP
  16. //"feens": {
  17. // "url": "https://freedomfeens.com",
  18. // "title": "Freedom Feens",
  19. // "img": "feen.png",
  20. // "alt": "Freedom Feens Radio Show: WORMS!"
  21. //},
  22. "ron": {
  23. "url": "https://ronpaulinstitute.org",
  24. "title": "Ron Paul Institute for Peace and Prosperity",
  25. "img": "rp2012.png",
  26. "alt": "Ron Paul: End the Wars, End the Fed! Legalize Freedom."
  27. },
  28. // Sold out after getting scammed by Trump
  29. //"aj": {
  30. // "url": "https://prisonplanet.com",
  31. // "title": "Alex Jones' InfoWars",
  32. // "img": "aj.png",
  33. // "alt": "Alex Jones' InfoWars: There's a War on for your Mind!"
  34. //},
  35. "mises": {
  36. "url": "https://mises.org",
  37. "title": "The LvMI",
  38. "img": "mises.png",
  39. "alt": "The Ludwig von Mises Institute"
  40. },
  41. "spooner": {
  42. "url": "https://en.wikisource.org/wiki/No_Treason/6",
  43. "title": "No Treason",
  44. "img": "spooner.png",
  45. "alt": "Lysander Spooner's 'No Treason: The Constitution of No Authority'"
  46. },
  47. "bastiat": {
  48. "url": "https://en.wikisource.org/wiki/Essays_on_Political_Economy/The_Law",
  49. "title": "The Law",
  50. "img": "bastiat.png",
  51. "alt": "Frederick Bastiat's 'The Law'"
  52. },
  53. "larken": {
  54. "url": "http://larkenrose.com/store/books/2019-the-most-dangerous-superstition.html",
  55. "title": "The Most Dangerous Superstition",
  56. "img": "tdms.png",
  57. "alt": "Larken Rose's 'The Most Dangerous Superstiton'"
  58. },
  59. "rats": {
  60. "url": "http://rats-nosnitch.com",
  61. "title": "RATS",
  62. "img": "rats.png",
  63. "alt": "Claire Wolfe's 'RATS' (STOP SNITCHIN')"
  64. },
  65. "boston": {
  66. "url": "http://javelinpress.com",
  67. "title": "Boston T. Party",
  68. "img": "javelin.png",
  69. "alt": "Javelin Press by Boston T. Party"
  70. }
  71. };
  72. var imgBase = window.themeDir+"/img/misc/";
  73. var keys = Object.keys(ads);
  74. var maximum = (keys.length);
  75. var rand = Math.floor(Math.random() * maximum);
  76. var ad = ads[keys[rand]];
  77. var linkbar = document.getElementById("linodeAd");
  78. var newNode = document.createElement("a");
  79. newNode.setAttribute("href", ad["url"]);
  80. newNode.setAttribute("title", ad["title"]);
  81. var img = document.createElement("img");
  82. img.setAttribute("src", imgBase + ad["img"]);
  83. img.setAttribute("alt", ad["alt"]);
  84. img.setAttribute("class", "jakes");
  85. newNode.appendChild(img);
  86. linkbar.parentNode.insertBefore(newNode, linkbar.nextSibling);
  87. });