Advertisement
Guest User

Untitled

a guest
Dec 1st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.65 KB | None | 0 0
  1. var ZARP = ZARP || {};
  2.  
  3. var Properties = function() {
  4.  
  5. // Private fields.
  6. var banAppealTemplate = `Hi
  7.  
  8. You will need to appeal the ban for this account using the following template:
  9. [code]
  10. [b]Name -[/b] What is your in-game name?
  11. [b]STEAM-ID -[/b] What is your STEAM-ID?
  12. [b]Admins Name -[/b] Who banned you/who might it be?
  13. [b]Reason -[/b] What is/might be the reason that you got banned?
  14. [b]Server -[/b] What server did you get banned from?
  15. [b]Time -[/b] How long were you banned for?
  16. [b]Story -[/b] What happened?
  17. [b]Proof -[/b] Any proof on a video/screenshot that clearly show what happened?
  18. [b]Extra Information -[/b] Any thing you think may be relevant to your ban.
  19. [/code]
  20.  
  21. Copy this template and create a topic in the [url=https://zarpgaming.com/index.php/forum/appeals]Appeals[/url] section. Make sure to fill out all the information correctly!`
  22.  
  23. var punishmentRequestTemplate = `Hi
  24.  
  25. You will need to create a punishment request using the following template:
  26. [code]
  27. [b]Name[/b] - (What is the accused person's name?)
  28. [b]Steam-ID[/b] - (What is the accused person's Steam-ID?)
  29. [b]Evidence Of Steam-ID[/b] - (Screenshot or video of the accused players Steam-ID)
  30. [b]Server[/b] - (What server was this on?)
  31. [b]Time And Date (CET)[/b] - (When did it happen?)
  32. [b]Other Comments[/b] - (Anything else you want to add?)
  33. [b]Reason[/b] - (What rules did the person break?)
  34. [b]Story[/b] - (What happened?)
  35. [b]Proof[/b] - (Any proof (video or screenshot) that clearly shows what happened.)
  36. [/code]
  37.  
  38. Copy this template and create a topic in the [url=https://zarpgaming.com/index.php/forum/report-abuse]Report Abuse[/url] section. Make sure to fill out all the information correctly!`
  39.  
  40. var demoteRequestTemplate = `Hi
  41.  
  42. You will need to create a demote request using the following template:
  43. [code]
  44. [b]Staff Member(s) Name:[/b]
  45.  
  46. [b]Staff Member(s) SteamID:[/b]
  47.  
  48. [b]What Did The Staff Member(s) do?:[/b]
  49.  
  50. [b]What Server(s) Was This On?:[/b]
  51.  
  52. [b]Evidence:[/b]
  53. [/code]
  54.  
  55. Copy this template and create a topic in the [url=https://zarpgaming.com/index.php/forum/report-abuse]Report Abuse[/url] section. Make sure to fill out all the information correctly!`
  56.  
  57. var banAppealTemplateClickEvent = function(){ document.getElementById("kbbcode-message").value = banAppealTemplate }
  58. var punishmentRequestClickEvent = function(){ document.getElementById("kbbcode-message").value = punishmentRequestTemplate }
  59.  
  60. var servers = [
  61. "play.zarpgaming.com:27015",
  62. "play.zarpgaming.com:27025",
  63. "play.zarpgaming.com:27030",
  64. "play.zarpgaming.com:27040",
  65. "play.zarpgaming.com:27035",
  66. "play.zarpgaming.com:27100",
  67. "usa.zarpgaming.com:27015"
  68. ];
  69.  
  70. var updateInterval = 10
  71.  
  72. // Public properties.
  73. return {
  74. BanAppealTemplate: banAppealTemplate,
  75. PunishmentRequestTemplate: punishmentRequestTemplate,
  76. DemoteRequestTemplate: demoteRequestTemplate,
  77. BanAppealButtonEvent: banAppealTemplateClickEvent,
  78. PunishmentRequestButtonEvent: punishmentRequestClickEvent,
  79. Servers: servers,
  80. UpdateInterval: updateInterval
  81. };
  82. }
  83.  
  84. ZARP.Properties = ZARP.Properties || Properties;
  85.  
  86. var CSRenderingFunctions = function() {
  87.  
  88. // Private functions.
  89. var changeBackgroundImage = function() {
  90. document.body.style.backgroundImage = "url('https://htmlcolorcodes.com/assets/images/html-color-codes-color-tutorials-hero-00e10b1f.jpg')";
  91. document.body.style.backgroundAttachment = "fixed";
  92. document.body.style.backgroundPosition = "center";
  93. document.body.style.backgroundRepeat = "no-repeat";
  94. document.body.style.backgroundSize = "cover";
  95. document.getElementsByClassName("rt-header-border")[0].style.backgroundColor = "rgba(0,0,0,0)";
  96. }
  97.  
  98. var createBanAppealTemplateButton = function() {
  99. createButton('Ban Appeal Template', ZARP.Properties.BanAppealButtonEvent);
  100. }
  101.  
  102. var createPunishmentRequestButton = function() {
  103. createButton('Report Abuse Template', ZARP.Properties.PunishmentRequestButtonEvent);
  104. }
  105.  
  106. var createButton = function(buttonLabel, onclickEvent) {
  107. var btn = document.createElement("INPUT");
  108. var t = document.createTextNode("CLICK ME");
  109. btn.appendChild(t);
  110. btn.className = "kbutton";
  111. btn.type = "Button";
  112. btn.value = buttonLabel;
  113. btn.onclick = onclickEvent;
  114. if (document.getElementById("kpost-buttons") != null) {
  115. document.getElementById("kpost-buttons").getElementById("kpost-buttons").appendChild(btn)
  116. }
  117. }
  118.  
  119. var updateWhosPlaying = function() {
  120. var randServrint = Math.floor((Math.random() * ZARP.Properties.Servers.length) + 1);
  121. var server = ZARP.Properties.Servers[randServrint - 1];
  122. document.getElementsByClassName("rt-block title4 box4 visible-desktop")[0].getElementsByClassName("module-surround")[0].getElementsByClassName("module-content")[0].getElementsByClassName("customtitle4 box4 visible-desktop")[0].getElementsByClassName("visible-large")[0].getElementsByTagName("iframe")[0].src='http://cache.www.gametracker.com/components/html0/?host='+server+'&bgColor=1F2642&fontColor=8790AE&titleBgColor=11172D&titleColor=FFFFFF&borderColor=333333&linkColor=FF9900&borderLinkColor=999999&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=250';
  123. }
  124.  
  125. var init = function() {
  126. changeBackgroundImage();
  127.  
  128. setInterval(function(){ changeWhosPlaying();}, serverUpdateInterval *1000);
  129. // Only call these functions if we're on the reply page.
  130. if (window.location.pathname.indexOf('/reply') > 0) {
  131. createBanAppealTemplateButton();
  132. createPunishmentRequestButton();
  133. }
  134. }
  135.  
  136. // Public accessors for private functions.
  137. return {
  138. Initialise: init
  139. };
  140. }();
  141.  
  142. ZARP.CSRendering = ZARP.CSRendering || CSRenderingFunctions;
  143. ZARP.CSRendering.Initialise();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement