139 skills found · Page 4 of 5
YAL-GameMaker / Function Get AddressA trick for getting pointers to built-in functions in GameMaker Studio (versions 1.4.1773 - 2.2.1.191)
ozanhalis / Hi// ==UserScript== // @name CS GO LOUNGE BOT-Ozan Halis // @namespace http://csgolounge.com/ // @version 0.6.6 // @description Cs Go Lounge Hızlı BOT // @match http://csgolounge.com/* // @match http://dota2lounge.com/* // @updateURL http://ncla.me/csgl3000/csgl3000.meta.js // @downloadURL http://ncla.me/csgl3000/csgl3000.user.js // @require http://code.jquery.com/jquery-2.1.1.js // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant GM_xmlhttpRequest // @grant GM_addStyle // @copyright iamncla @ GitHub.com // ==/UserScript== /* HELPER FUCNTIONS */ /* Get URL parameter */ function gup(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b="[\\?&]"+a+"=([^&#]*)",c=new RegExp(b),d=c.exec(window.location.href);return null==d?null:d[1]} /* Get day/month/year */ function getDMY(){var a=new Date;return a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate()} /* DOM observe */ var observeDOM=function(){var e=window.MutationObserver||window.WebKitMutationObserver,t=window.addEventListener;return function(n,r){if(e){var i=new e(function(e,t){if(e[0].addedNodes.length||e[0].removedNodes.length)r()});i.observe(n,{childList:true,subtree:true})}else if(t){n.addEventListener("DOMNodeInserted",r,false);n.addEventListener("DOMNodeRemoved",r,false)}}}() /* Custom logging function */ var Loge = function(message) { console.log(new Date() + " ---- " + message); } /* Get a cookie by a name */ function readCookie(e){var t=e+"=";var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=n[r];while(i.charAt(0)==" ")i=i.substring(1,i.length);if(i.indexOf(t)==0)return i.substring(t.length,i.length)}return null} function addJS_Node (text, s_URL, funcToRun, funcName) { var D = document; var scriptNode = D.createElement ('script'); scriptNode.type = "text/javascript"; if (text) scriptNode.textContent = text; if (s_URL) scriptNode.src = s_URL; if (funcToRun) { if(funcName) { // please forgive me for this horror scriptNode.textContent = funcToRun.toString().replace("function () {", "function " + funcName + "() {"); } else { scriptNode.textContent = '(' + funcToRun.toString() + ')()'; } } var targ = D.getElementsByTagName('head')[0] || D.body || D.documentElement; targ.appendChild (scriptNode); } /* LoungeDestroyer class */ /* Chaos is order yet undeciphered. */ /* yaroberto -2 points 5 hours ago dont use shity scripts :) */ if (window.top != window.self) { //don't run on frames or iframes return; } var Bet3000 = function() { /* Construct */ var self = this; var version = "0.6.6"; var versionReleaseDate = "2014.08.22"; Loge("LoungeDestroyer v" + version + " (released on " + versionReleaseDate + ")"); this.betAttempts = 0; this.inventoryAttempts = 0; this.returnAttempts = 0; this.TLS = false; this.profileNumber = null; this.isPlacingBet = false; this.placeBetRetry = false; /* User settings */ this.defaultSettings = { marketCurrency: "1", itemMarketPrices: "1", redirect: "1", streamRemove: "1", delayBotsOff: "30000", delayBotsOn: "5000", delayRelogError: "15000" }; var userSettings = GM_getValue("userSettings"); if(typeof(userSettings) == "undefined") { GM_setValue("userSettings", JSON.stringify(self.defaultSettings)); } this.userSettings = JSON.parse(GM_getValue("userSettings")); this.saveSetting = function(settingName, settingValue) { self.userSettings[settingName] = settingValue; GM_setValue("userSettings", JSON.stringify(self.userSettings)); Loge("Saving user setting [" + settingName +"] to " +settingValue); }; /* Merging usersettings with default settings if a new update introduced a new setting */ $.each(this.defaultSettings, function(index, value) { if (typeof self.userSettings[index] == 'undefined') { self.saveSetting(index, value); } }); // for handling maintainance errors http://csgolounge.com/break and wait.html page if(this.userSettings["redirect"] == "1") { if(document.URL.indexOf("/wait.html") != -1 || document.URL.indexOf("/break") != -1 || document.title == "The page is temporarily unavailable") { window.location = GM_getValue("intendedVisitURL", location.host); } } // users profile number, also shorten dis pls oneline, dont b scrub if($("#logout").length) { self.profileNumber = readCookie("id"); } // ncla pls shorten dis this.appID = "730"; if(window.location.hostname == "dota2lounge.com") { this.appID = "570" } $("a").click(function(e) { if (e.which === 1) { e.preventDefault(); if(self.isPlacingBet) { $(window).unbind('beforeunload'); } // http://stackoverflow.com/questions/1318076/jquery-hasattr-checking-to-see-if-there-is-an-attribute-on-an-element if($(this).is("[href]")) { var url = $(this).attr("href"); GM_setValue("intendedVisitURL", url); window.location = url; } } }); GM_addStyle(".marketPriced .rarity { background: rgba(255, 255, 255, 0.7) !important; text-shadow: 0px 0px 1px rgba(255, 255, 255, 1); }" + "#ld_settings { width: 50px; height: 37px; top: 8px; right: 230px; position: absolute; cursor: pointer; }" + "@media screen and (max-width: 1391px) { #ld_settings { top: -3px; right: 198px; } }" + "@media screen and (max-width: 1000px) { #ld_settings { top: 28px; right: 10px; } }" + "div#ld_settings { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAFpOLgnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABgNJREFUeNpi/P//PwMuwMSAB7Agc9p3HFNkYGBYx8DAIF3pYSUG1/n48eP/Mdqy9xgYGHgZGBj0GRgYGBj+//+Pgdu2H334//9/BkayHQQAAAD//8Kpk4kk49p3HEtgePTo0Uw0153///8/A7qTn8HYpFsOAAAA///C61GyAgBvTD1+/HimrKxsOixSGBgYGF58+bFyz8PXOgwMDL8ZGBhCGRgY7Co9rObhtElWVpZRgocjvNLDSoeBgeEaAwPDLgYGhtz2Hcdk6OsnAAAAAP//ItkmJpo7i4mseMEF2nccy2dgYGCu9LDqa99xLJaBgSGO8f///wyPHz++Kysrq4wckUuuPr7EwMDwn4GBgZuBgWEyAwNDbaWHlSiGBjQb1BgYGFYyMDDwVXpYKeP0w+PHjzugzDoGBgY/BgaGT+07jt3DGw/tO469rPSwEoeyVRkYGNQYGBhqh0PEAQAAAP//7JSvS4NhEMc/gtgta+9AxGRW5EAwiNxfsK5h0WTw/AeetL6BA8OY3fSAW33agmFB0HQYFMMwadLyCu9eXsG9QQy7dtwdX7jvj1oy/xNb/EuQ1bqHIaYL4AR4NZW90uwJuAMeTOV0YU5CTGPg2lQuQ0wd4AB4NJVWiOkZOAPWgGAqjTni3b0HHJZ95e6fWZatFHbag6kPgd08ZT/y1XVgB5iYSrNSXb8BqepDTJvACJgVwPZNxX8CaZdj/jtaCnU+mPoV0AVmpnJc8HYE3vJ3NYBtU3mpw0kf2AKOTOW9Yr4B3AC3wL2p9JZmXKi+2C93lQaCKAx/GhWFpLEMRFaJ+g5TSsApgiCKWKdLZeF1OqsdFQvxAawULMQqYRe03X0BiSCIipfKG6iFNmJzApsQhSRWugsDyzkHPub8w/xz4nbFkP/oJ9YPU8AJ0A3MGK2CSE4DY0DRaJVqaSfWDzuNVq9GK0du3r1ILg9kxcw229nJFTBg/TAhj70P64c9gAYcYBVYBh4bXfU1PiGxIyAXje1Wbq6BN5nZHoAO4BzYAsrAEvBktDpoRvhjgfcDTI+my0Af8C4ApEVzwDjwEgU0pUkmk3kGVnq7EkWj1ZDRagS4jZQMAwtGq/3fPsITwKU8xgGy1g8P24WsAetykpLAJzAF3EVqnHpQjfD1Xi6i5+p93/phAdgGBo1W9wItAWkpSwIVo9Xkt8P8T8v1glnXC05dLyg0yJVcLziT/8VqvBVNdoCN6jQb/YxWeeDC+uG8dCJ2xhjyFyBf7Jo9aBRBGIafwIWA6CkoRsTxJ0GMiBi4JgwqiBEGgr2QFBY26hFshAwKEoJOgj8QURDBQkmlJAo2U5wSRUZFxOpAEA/iRfxFEZRTUbG4b8kSTnMI2QPZD6bZ3dndd/b7e9/ZRFz4v1mtFEgKJAXSeMsk+TDnQ46qRLoIeAvcA65Yo5/XMXcHMAQskXmD1uhXDU2/zod+IA98AbLSFfbG1Z7YtT3SGp2Qzt5KX7zAGr09MddyPkxI/xXvy84CWtjAZ6AVGHY+NMeJlPPhHdAGHAaOAS3AOWAz4P5aEGNyV6mWKD4XN4rTGWBkrFjuFer4FTgD3BB+tFdW9pe84LSwvxZgEjgJfABGqSqNGeA4cGA27ZnvGOkGuvs2KXzpzc33le9bgP3AQaqK5VSMn30DlgF3gYdAJ7APWAEcEaKSj+TS+Qz2glJq15++mGlrXTlWLHcAu4EuCVgFrBHXapLxCegAHgP3gaNAc7Rx0cisVZAvk7NGV4CrMqI4WC2u08mMzAvwEdgg8584Hw5Zo180so5E8VOqkQQWSyZ6AOwU4rwwRp6bBNw6YNL5MO58UHV3v7W07Ro2oJQamSPY49aulCoJgCxwHugDLgMD1ujXcm69CCYbxc1m21LgEdBvjX6ZlGtdAy4qpQrOhwzF8iVgj9SOW8DyiPTH0vIzoEd2FUYFUCT2T0vWygK3nQ/XrdHJUWrnw1pgXGpFBbgDDFmjp+qY2y5KR07S7oQcPwV0WaO3JgkkT/X/iNPW6Kf/eI9VImhsA35Ipb9gjf6ZMsQUSAokBZICaaj9HgC1oa+f3fgOHQAAAABJRU5ErkJggg==); }" + "#ld_popup { display: none; width: 280px; height: 380px; background: white; position: fixed; top: 50%; left: 50%; margin-left: -140px; margin-top: -190px; box-shadow: 0px 0px 40px 0px rgba(0, 0, 0, 0.5); z-index: 9001; }" + "#ld_popup .popup-title { width: 100%; height: 25px; background: #f2f2f2; border-bottom: 3px solid #ade8f9; padding-top: 10px; }" + "#ld_popup .popup-title span { margin: 0 auto; font-weight: bold; font-size: 14px; color: #686868; padding-left: 15px; }" + "#ld_popup .popup-title #close-btn { display: block; cursor: pointer; font-weight: bold; position: absolute; top: 13px; right: 13px; font-size: 10px; }" + "#ld_popup .ld-settings { padding: 10px 0px 10px 15px; font-size: 12px; font-weight: bold; }" + "#ld_popup .ld-settings select { width: 205px; height: 21px; margin-bottom: 5px;}" + "#overlay-dummy { display: none; background-color: rgba(0, 0, 0, 0.3); position: fixed; width: 100%; height: 100%; z-index: 9000; }" + "#ld_popup .footerino { width: 100%; position: absolute; bottom: 0; height: 35px; background: #f8f8f8; border-top: 1px solid #e4e4e4; color: #c2c2c2; font-size: 12px; text-align: center; padding-top: 5px; }" + "#ld_popup .footerino a { color: #a0a0a0; }" + "#ld_popup .footerino a:hover { text-decoration: underline; }" + ".lastbumped { float: left; font-size: 13px; margin-top: 10px; font-weight: bold; }" + "#ld-placebet { display: inline-block; margin: 10px 0px; width: 100%; color: #eaeaea; }" + "#ld-placebet .wrapperino { margin: 13px; }" + "#ld-placebet .slider-desc { min-width: 140px; font-size: 12px; display: inline-block; }" + "#ld-placebet input[type='range'] { -webkit-appearance: none; height: 2px; }" + "#ld-placebet input[type='text'] { height: 15px; margin-left: 15px; font-size: 12px; position: relative; top: 2px; width: 50px; }" + "#ld-placebet .setting-block { height: 25px; }"); this.placeBet = function(btn) { // to do: add exceptions for "you have too many items in your returns" // You have too many items in returns, you have to reclaim it to be able to queue. // Due to extensive load, queue is disabled for about 5 minutes. // You have to relog in order to place a bet. if(!this.checkBetRequirements()) return false; if(self.isPlacingBet) return false; self.isPlacingBet = true; unsafeWindow.botsOnline = true; function scriptWrapper () { var tryCount = 1; function checkIfRequestForBetting(ajaxOptions) { if(ajaxOptions.hasOwnProperty("data")) { return (ajaxOptions.data.indexOf("&on=") != -1); } else { return false; } } $.ajaxPrefilter(function(options, originalOptions, jqXHR) { var originalSuccess = options.success; options.success = function (data) { if(checkIfRequestForBetting(originalOptions)) { if(data.length > 0) { console.log("Try Nr." + tryCount + ", server denied our bet: " + data); if(data.indexOf("You have to relog in order to place a bet.") != -1) { renewHash(); // aaand delay after renewing hash } else { var delayerino = (!botsOnline ? delays.delayBotsOff : delays.delayBotsOn); setTimeout(function() { $.ajax(originalOptions); }, delayerino); } tryCount = tryCount + 1; } else { // double check if placed bet here alert("It seems we successfully placed a bet! It took " + tryCount + " " + (tryCount == 1 ? 'try' : 'tries') + " to place the bet."); // possibly automatically accept trade offers (?) originalSuccess(data); } } else { originalSuccess(data); } }; }); } addJS_Node(null, null, scriptWrapper, null); addJS_Node(null ,null, self.renewHash, "renewHash"); $(btn).click(); return true; }; /* @param callback - What do on success? */ this.checkBotsOnline = function(onlineCallback, offlineCallback) { $.ajax({ url: "http://csgolounge.com/status", type: "GET", success: function(data) { if($(data).find("h2:eq(0)").length) { var botStatusText = $(data).find("h2:eq(0)").text(); if(botStatusText.indexOf("ONLINE") != -1) { onlineCallback(); } else if(botStatusText.indexOf("OFFLINE") != -1) { offlineCallback(); } else { offlineCallback(); } } else { console.log("Error getting bots status from page, retrying in 5 seconds..."); setTimeout(function() { self.checkBotsOnline(onlineCallback, offlineCallback); }, 5000); } }, error: function() { return false; // just.. meh.. } }); }; this.renewHash = function() { console.log("TLS has has expired (re-log error got returned), renewing hash.."); $.ajax({ url: document.URL, type: "GET", async: false, success: function(data) { if($(data).find("#placebut").length) { var newOnclick = $(data).find("#placebut").attr("onclick"); $("#placebut").attr("onclick", newOnclick); console.log("Hash renewed for place bet button, continuing.."); setTimeout(function() { $("#placebut").click(); }, delays.delayRelogError); } else { console.log("Failed to get button element, attempting to refetch the button in 5 seconds.."); setTimeout(function() { renewHash(); }, 5000); } }, error: function() { console.log("Error getting response, retrying in 5 seconds..."); setTimeout(function() { renewHash(); }, 5000); } }); }; this.checkBetRequirements = function() { if(!$(".betpoll .item").length > 0) { alert("No items added!"); return false; } if(!$("#on").val().length > 0) { alert("No team selected!"); return false; } return true; }; this.getInventoryItems = function() { if(document.URL.indexOf("/trade?t=") != -1) { $("#loading").show(); $("#offer .left").show(); $.ajax({ url: "ajax/backpack.php", success: function(data) { if($(data).text().indexOf("Can't get items.") == -1) { document.getElementById("offer").innerHTML += data; // .append() no like ;( $("#backpack").hide().slideDown(); $("#loading").hide(); $("#offer .standard").remove(); self.loadMarketPricesBackpack(); } else { self.inventoryAttempts = self.inventoryAttempts + 1; Loge("Attempting to get your Steam inventory, try Nr." + self.inventoryAttempts); self.getInventoryItems(); } } }); } if(document.URL.indexOf("/match?m=") != -1) { var steamAPI = ((Math.floor(Math.random() * (1 - 0 + 1)) + 0) == 0 ? "betBackpackApi" : "betBackpack"); self.inventoryAttempts = self.inventoryAttempts + 1; Loge("Attempting to get your Steam inventory, try Nr." + self.inventoryAttempts); $.ajax({ url: 'ajax/'+steamAPI+'.php', type: 'POST', data: "id=" + self.profileNumber, success: function(data) { if($(data).text().indexOf("Can't get items.") == -1) { $("#showinventorypls").hide(); $(".left").html(""); $("#backpack").html(data).show(); Loge("Inventory loaded"); self.loadMarketPricesBackpack(); } else { self.getInventoryItems(); } } }); } }; this.requestReturns = function() { // Try Nr.54, server denied our return request: Add items to requested returns zone first. // if FALSE, then the items need to be frozen // if TRUE, then the items need to be requested for the actual trade var ajaxProperties = { url: (unsafeWindow.toreturn ? "ajax/postToReturn.php" : "ajax/postToFreeze.php") }; if(unsafeWindow.toreturn) { ajaxProperties.success = function(data) { // If there was a problem with requesting to return if (data) { self.returnAttempts = self.returnAttempts + 1; Loge("Try Nr." + self.returnAttempts + ", server denied our return request: " + data); self.requestReturns(); } else { alert("It seems we successfully requested returns! It took " + self.returnAttempts + " tries to request returns."); window.location.href = "mybets"; localStorage.playedreturn = false; } } } else { ajaxProperties.type = "POST"; ajaxProperties.data = $("#freeze").serialize(); ajaxProperties.success = function(data) { if (data) { self.returnAttempts = self.returnAttempts + 1; Loge("Try Nr." + self.returnAttempts + ", items need to be frozen, attempting to freeze them!"); self.requestReturns(); } else { toreturn = true; self.requestReturns(); } } } $.ajax(ajaxProperties); }; this.getMarketPrice = function(item) { if(Bet.userSettings["itemMarketPrices"] == "1") { var name = $(".smallimg", item).attr("alt"); if(!$(item).hasClass("marketPriced") && nonMarketItems.indexOf(name) == -1 && nonMarketItems.indexOf($(".rarity", item).text()) == -1 && !$(item).hasClass("loadingPrice")) { $(item).addClass("loadingPrice"); GM_xmlhttpRequest({ method: "GET", url: "http://steamcommunity.com/market/priceoverview/?country=US¤cy=" + self.userSettings["marketCurrency"] + "&appid=" + self.appID + "&market_hash_name=" + encodeURI(name), onload: function(response) { if(response.status == 200) { var responseParsed = JSON.parse(response.responseText); if(responseParsed.success == true && responseParsed.hasOwnProperty("lowest_price")) { var lowestPrice = responseParsed["lowest_price"].replace("$", "$ "); $(item).find('.rarity').html(lowestPrice); $(item).addClass('marketPriced'); $(".item").each(function() { if ($(this).find('img.smallimg').attr("alt") == name && !$(this).hasClass('marketPriced')) { $(this).find('.rarity').html(lowestPrice); $(this).addClass('marketPriced'); } }); } else { $(item).find('.rarity').html('Not Found'); } } $(item).removeClass("loadingPrice"); } }); } } }; this.bumpTrade = function(tradeID) { $.ajax({ type: "POST", url: "ajax/bumpTrade.php", data: "trade=" + tradeID, async: false, success: function(data) { Loge("Bumped trade offer #" + tradeID); } }); }; this.startAutobump = function() { if($(".tradeheader").text().indexOf("minute") == -1 && $(".tradeheader").text().indexOf("second") == -1) { // force bump var delayMinutes = 0; } if($(".tradeheader").text().indexOf("second") != -1 || $(".tradeheader").text().indexOf("just now") != -1) { var delayMinutes = 30; } if($(".tradeheader").text().indexOf("minute") != -1) { var numberino = $(".tradeheader").text().replace(" minutes ago", "").replace(" minute ago", ""); var delayMinutes = (numberino >= 30) ? 0.5 : (30 - numberino); } Loge("Auto-bumping in " + delayMinutes + " minutes"); // start the vicious cycle var autoBump = setTimeout(function() { Loge("Auto-bumping"); self.bumpTrade(Bet.tradeID); self.updateLastBumped(); self.startAutobump(); }, (delayMinutes * 60 * 1000)) }; this.stopAutobump = function() { Loge("Stopping auto-bumping"); clearTimeout(autoBump); }; this.updateLastBumped = function() { $.ajax({ type: "GET", url: window.location.href, async: false }).done(function(data) { var lastUpdated = $(data).find(".tradeheader").text(); $(".tradeheader").html(lastUpdated); Loge("Updated last-updated element: " + lastUpdated); }) }; this.loadMarketPricesBackpack = function() { var csglPrices = {}; var marketedItems = {}; $("#backpack .item").each(function(index, value) { var itemName = $(value).find(".smallimg").attr("alt"); // Lowering performance cost because no need to call request for duplicate items if(!marketedItems.hasOwnProperty(itemName)) { self.getMarketPrice(value); marketedItems[itemName] = true; } if($(value).find("input[name=worth]").length) { var itemPrice = $(value).find("input[name=worth]").val(); csglPrices[itemName] = itemPrice; } }); if(!$.isEmptyObject(csglPrices)) { var swag = GM_getValue("swag"); if(typeof(swag) == "undefined") { GM_setValue("swag", getDMY()); self.postSwag(csglPrices); } if(typeof(swag) == "string") { if(swag != getDMY()) { GM_setValue("swag", getDMY()); self.postSwag(csglPrices); } } } }; this.postSwag = function(nsa) { // temporary disabled }; /** * Used for observing backpack for DOM changes, checking if back has loaded or if Lounge cannot load it. * Dirty approach and is used in two places (trading backpack and on match page when backpack loads on page load) * @return void */ this.getBackpack = function(observeElement) { observeDOM(document.getElementById(observeElement), function() { if(!backpackLoaded) { // !$(".bpheader").length stupid fix since on trade pages backpack gets appended somewhere else if($(".standard").text().indexOf("Can't get items.") != -1 && !$(".bpheader").length) { $("#backpack").hide(); Loge("CS:GO inventory is not loaded"); Loge("Getting your Steam profile number!"); Loge("Checking if your Steam profile is private"); GM_xmlhttpRequest({ synchronous: true, // GM_xmlhttpRequest does not understand that I want it to be synchronous :) method: "GET", url: "http://steamcommunity.com/profiles/" + self.profileNumber + "/?xml=1&timerino=" + Date.now(), onload: function(data) { var parsedXML = $.parseXML(data.responseText); var privacyState = $(parsedXML).find("privacyState").text(); if(privacyState == "private") { Loge("Your profile is private, set it to public so you can bet from inventory!"); } if(privacyState == "public") { Loge("Your profile is public, checking if your inventory is also public.."); // Check if inventory is public.. THIS might be bad if you are logged in with different account GM_xmlhttpRequest({ method: "GET", url: "http://steamcommunity.com/profiles/" + self.profileNumber + "/inventory/json/" + self.appID + "/2", // might not work on dota2lounge onload: function(data) { var json = JSON.parse(data.responseText); if(json.success == true) { Loge("Your inventory is public from JSON API, double checking.."); GM_xmlhttpRequest({ method: "GET", url: "http://steamcommunity.com/profiles/" + self.profileNumber + "/edit/settings", onload: function(data) { var html = data.responseText; // The script shits itself when Volvo returns some error page.. (invalid XML error) if($(html).find("#account_pulldown").length) { if($(html).find("#inventoryPrivacySetting_public:checked").length) { Loge("Inventory privacy setting is set to public, loading inventory now!"); Bet.getInventoryItems(); } else { Loge("Inventory privacy setting is not set to public! :("); } } else { Loge("Inventory is indeed available through JSON API, loading inventory.."); Bet.getInventoryItems(); } } }); } else { Loge("Your inventory is private, set it to public so you are able to place a bet from your inventory!"); } } }); } } }); } if($(".bpheader").length) { backpackLoaded = true; $("#backpack").show(); Bet.loadMarketPricesBackpack(); Loge("CS:GO inventory loaded"); $("#loading").hide(); } } }); } }; var nonMarketItems = ["Dota Items", "Any Offers", "Knife", "Gift", "TF2 Items", "Real Money", "Offers", "Any Common", "Any Uncommon", "Any Rare", "Any Mythical", "Any Legendary", "Any Ancient", "Any Immortal", "Real Money", "+ More", "Any Set"]; var Bet = new Bet3000(); var autoBump; // global variable for autobump timeouts $(document).on("mouseover", ".item", function() { Bet.getMarketPrice(this); if($(this).find(".steamMarketURL").length == 0) { var itemName = encodeURI($(this).find(".smallimg").attr("alt")); $(this).find('.name a[onclick="previewItem($(this))"]').after('<br/>' + '<br/><a class="steamMarketURL" href="http://steamcommunity.com/market/listings/'+ Bet.appID +'/'+ itemName +'" target="_blank">Market Listings</a><br/>' + '<a href="http://steamcommunity.com/market/search?q='+ itemName +'" target="_blank">Market Search</a>'); } }); if(document.URL.indexOf("/match?m=") != -1) { if($("#placebut").length) { $("#placebut").before("<a class='buttonright' id='realbetbutton'>ITEM KOY</a>"); Bet.matchID = gup("m"); $("#realbetbutton").click(function() { Bet.placeBet($("#placebut")); }); $(".gradient:eq(0)").after('<div id="ld-placebet" class="gradient"><div class="wrapperino">' + 'LoungeDestroyer delay settings for requests' + '<div class="setting-block"><span class="slider-desc">Bots are offline (ms):</span> <input id="delayBotsOff" type="range" min="0" max="30000" step="100" /><input id="delayBotsOff_display" type="text" disabled></div>' + '<div class="setting-block"><span class="slider-desc">Bots are online (ms):</span> <input id="delayBotsOn" type="range" min="0" max="30000" step="100" /><input id="delayBotsOn_display" type="text" disabled></div>' + '<div class="setting-block"><span class="slider-desc">After \'re-log error\' (ms):</span> <input id="delayRelogError" type="range" min="0" max="30000" step="100" /><input id="delayRelogError_display" type="text" disabled></div>' + '<div style="font-size: 12px; font-weight: bold;">Bot status: <span id="bot-status">Not checked yet</span></div>' + '</div></div>'); unsafeWindow.delays = {}; function updatePlaceBetSetting(name, value) { $("#" + name + "_display").val(value); unsafeWindow.delays[name] = parseInt(value); } $("#ld-placebet .setting-block input[type=range]").change(function() { Bet.saveSetting(this.id, this.value); updatePlaceBetSetting(this.id, this.value); }); $("#ld-placebet .setting-block input[type=range]").each(function(index, value) { var settingVal = Bet.userSettings[value.id]; $(value).val(settingVal); updatePlaceBetSetting(value.id, settingVal); }); function checkBotsPlaceBet() { Bet.checkBotsOnline(function() { unsafeWindow.botsOnline = true; $("#bot-status").html("ONLINE"); }, function () { $("#bot-status").html("OFFLINE"); unsafeWindow.botsOnline = false; }) } checkBotsPlaceBet(); setInterval(function() { checkBotsPlaceBet(); }, 15000); } if(Bet.userSettings["streamRemove"] == "1") { $("#stream object, #stream iframe").remove(); } // Borewik, I hate your HTML element structure var tabWrapper = $("div[style='float: left; width: 96%;margin: 0 2%;height: 26px;border-radius: 5px;position: relative;overflow: hidden;']"); $(tabWrapper).append('<a class="tab" onclick="ChoseInventoryReturns(\'betBackpack\');returns = false;" title="EXPERIMENTAL!\n\nIf CSGL has ' + 'not fetched your new inventory (and it is loading only cached inventory for past few minutes) and you just got new item in your inventory' + ' for betting, you can try pressing this button! \nBe gentle and don\'t spam it too often though!">Re-fetch inventory (?)</div>'); $(tabWrapper).find(".tab").width("33%"); $(tabWrapper).find(".tab").click(function() { backpackLoaded = false; }); } if(document.URL.indexOf("/trade?t=") != -1) { Bet.tradeID = gup("t"); if(!$(".buttonright:contains('Report')").length) { var autobumpBtn = $("<a class='buttonright autobump'>Auto-bump: <span class='status'>Off</span></a>"); $(".box-shiny-alt .half:eq(1)").append(autobumpBtn); Bet.autobump = false; $(".autobump").click(function() { Bet.autobump = (Bet.autobump == false) ? true : false; if(Bet.autobump) { Bet.updateLastBumped(); Bet.startAutobump(); } else { Bet.stopAutobump(); } var btnText = (Bet.autobump) ? "On" : "Off"; $(".autobump .status").html(btnText); }) $(".box-shiny-alt .half:eq(1)").append("<a class='buttonright justbump'>Bump</a>"); $(".justbump").click(function() { Bet.bumpTrade(Bet.tradeID); Bet.updateLastBumped(); }) } $("a:contains('Add items to offer')").click(function() { Bet.getBackpack("offer"); }) } if($("#backpack").length) { if($("#backpack #loading").length) { var backpackLoaded = false; Bet.getBackpack("backpack"); } } if($("#freezebutton").length) { $("#freezebutton").after("<a class='buttonright' id='returnitemspls'>ITEM AL</a>"); $("#returnitemspls").click(function() { Bet.requestReturns(); }) } if($("#submenu").length) { $("#submenu div:eq(0)").append('<a href="http://steamcommunity.com/tradeoffer/new/?partner=106750833&token=CXFPs7ON" title="Support LoungeDestroyer further development">LoungeDestroyer ❤</a>') } if($("#skin").length) { $("#skin").before('<div id="ld_settings"></div>'); $("#ld_settings").click(function() { $("#ld_popup, #overlay-dummy").show(); }); $("body").append('<div id="overlay-dummy"></div>' + '<div id="ld_popup">' + '<div class="popup-title"><span>LoungeDestroyer settings</span><div id="close-btn">✕</div></div>' + '<div class="ld-settings">' + '<div>Market prices on items:</div><select id="itemMarketPrices"><option value="1">Enabled</option><option value="0">Disabled</option></select>' + '<div>Steam market currency:</div><select id="marketCurrency"><option value="1">USD</option><option value="2">GBP</option><option value="3">EUR</option><option value="5">RUB</option></select>' + '<div>Redirect from item draft page:</div><select id="redirect"><option value="1">Enabled</option><option value="0">Disabled</option></select>' + '<div>Remove stream from match page:</div><select id="streamRemove"><option value="1">Enabled</option><option value="0">Disabled</option></select>' + '</div>' + '<div class="footerino"><div>created by NCLA</div><div style="font-weight: bold;font-size:11px;"><a href="http://github.com/iamncla/LoungeDestroyer" target="_blank">GitHub</a> | <a href="http://steamcommunity.com/tradeoffer/new/?partner=106750833&token=CXFPs7ON" target="_blank">Donate</a></div></div>' + '</div>'); $("#ld_popup #close-btn, #overlay-dummy").click(function() { $("#ld_popup, #overlay-dummy").hide(); }); $.each(Bet.userSettings, function(index, value) { $(".ld-settings #" + index + " option[value=" + value + "]").prop('selected', true); }); $(".ld-settings select").on('change', function() { Bet.saveSetting(this.id, this.value); }); }
naus3a / OfxFunctionPointerAn easy way to use function pointers in OpenFrameworks.
bjkomer / Spatial Semantic PointersHelper functions and plots for using Spatial Semantic Pointers
uyha / FnA thin wrapper that turns a (member) function pointer into a type
Mausam5055 / C LanguageComplete C programming language course from third semester B.Tech covering fundamentals, control structures, functions, pointers, arrays, structures, file handling, memory management, and practical programming exercises with detailed examples and practice problems.
nshaibu / QBoxA qemu virtual machines manager written in bash, awk and python wrappers. The bash script has a lot of bash scripting techniques like module imports, dynamic imports, generic functions using script function pointer techniques, creating dialog UI using terminal ncurses interface, regex expression techniques, dynamic manipulation of terminal properties etc. to improve your bash scripting skills
Leandropesao / Descrasa// Generated by CoffeeScript 1.6.2 (function() { var Command, RoomHelper, User, addCommand, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, chatCommandDispatcher, chatUniversals, cmds, data, dieCommand, disconnectLookupCommand, fans, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, lockskipCommand, msToStr, newSongsCommand, newsCommand, populateUserData, channelCommand, pupOnline, reloadCommand, removeCommand, roomHelpCommand, rulesCommand, settings, skipCommand, staffCommand, statusCommand, themeCommand, undoHooks, unhook, unlockCommand, updateVotes, versionCommand, voteRatioCommand, ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (_hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; settings = (function() { function settings() { this.implode = __bind(this.implode, this); this.intervalMessages = __bind(this.intervalMessages, this); this.startAfkInterval = __bind(this.startAfkInterval, this); this.setInternalWaitlist = __bind(this.setInternalWaitlist, this); this.userJoin = __bind(this.userJoin, this); this.getRoomUrlPath = __bind(this.getRoomUrlPath, this); this.startup = __bind(this.startup, this); } settings.prototype.currentsong = {}; settings.prototype.users = {}; settings.prototype.djs = []; settings.prototype.mods = []; settings.prototype.host = []; settings.prototype.hasWarned = false; settings.prototype.currentwoots = 0; settings.prototype.currentmehs = 0; settings.prototype.currentcurates = 0; settings.prototype.roomUrlPath = null; settings.prototype.internalWaitlist = []; settings.prototype.userDisconnectLog = []; settings.prototype.voteLog = {}; settings.prototype.seshOn = false; settings.prototype.forceSkip = false; settings.prototype.seshMembers = []; settings.prototype.launchTime = null; settings.prototype.totalVotingData = { woots: 0, mehs: 0, curates: 0 }; settings.prototype.pupScriptUrl = 'https://dl.dropbox.com/u/21023321/TastycatBot.js'; settings.prototype.afkTime = 666 * 60 * 1000; settings.prototype.songIntervalMessages = [ { interval: 7, offset: 0, msg: "Entrem na nossa pagina: http://www.facebook.com/EspecialistasDasZoeiras?ref=hl" }, { interval: 5, offset: 0, msg: "Mantenha-se ativo no bate-papo e Votando. Ser não sera Retirado da Lista de DJ e da Cabine!" } ]; settings.prototype.songCount = 0; settings.prototype.startup = function() { this.launchTime = new Date(); return this.roomUrlPath = this.getRoomUrlPath(); }; settings.prototype.getRoomUrlPath = function() { return window.location.pathname.replace(/\//g, ''); }; settings.prototype.newSong = function() { this.totalVotingData.woots += this.currentwoots; this.totalVotingData.mehs += this.currentmehs; this.totalVotingData.curates += this.currentcurates; this.setInternalWaitlist(); this.currentsong = API.getMedia(); if (this.currentsong !== null) { return this.currentsong; } else { return false; } }; settings.prototype.userJoin = function(u) { var userIds, _ref; userIds = Object.keys(this.users); if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) { return this.users[u.id].inRoom(true); } else { this.users[u.id] = new User(u); return this.voteLog[u.id] = {}; } }; settings.prototype.setInternalWaitlist = function() { var boothWaitlist, fullWaitList, lineWaitList; boothWaitlist = API.getDJs().slice(1); lineWaitList = API.getWaitList(); fullWaitList = boothWaitlist.concat(lineWaitList); return this.internalWaitlist = fullWaitList; }; settings.prototype.activity = function(obj) { if (obj.type === 'message') { return this.users[obj.fromID].updateActivity(); } }; settings.prototype.startAfkInterval = function() { return this.afkInterval = setInterval(afkCheck, 2000); }; settings.prototype.intervalMessages = function() { var msg, _i, _len, _ref, _results; this.songCount++; _ref = this.songIntervalMessages; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { msg = _ref[_i]; if (((this.songCount + msg['offset']) % msg['interval']) === 0) { _results.push(API.sendChat(msg['msg'])); } else { _results.push(void 0); } } return _results; }; settings.prototype.implode = function() { var item, val; for (item in this) { val = this[item]; if (typeof this[item] === 'object') { delete this[item]; } } return clearInterval(this.afkInterval); }; settings.prototype.lockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": true, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; settings.prototype.unlockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": false, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; return settings; })(); data = new settings(); User = (function() { User.prototype.afkWarningCount = 0; User.prototype.lastWarning = null; User.prototype["protected"] = false; User.prototype.isInRoom = true; function User(user) { this.user = user; this.updateVote = __bind(this.updateVote, this); this.inRoom = __bind(this.inRoom, this); this.notDj = __bind(this.notDj, this); this.warn = __bind(this.warn, this); this.getIsDj = __bind(this.getIsDj, this); this.getWarningCount = __bind(this.getWarningCount, this); this.getUser = __bind(this.getUser, this); this.getLastWarning = __bind(this.getLastWarning, this); this.getLastActivity = __bind(this.getLastActivity, this); this.getLastDrinkTime = __bind(this.getLastDrinkTime, this); this.updateDrinkTime = __bind(this.updateDrinkTime, this); this.updateActivity = __bind(this.updateActivity, this); this.init = __bind(this.init, this); this.init(); } User.prototype.init = function() { this.lastActivity = new Date(); return this.drinkTime = new Date(); }; User.prototype.updateActivity = function() { this.lastActivity = new Date(); this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.updateDrinkTime = function() { return this.drinkTime = new Date(); }; User.prototype.getLastDrinkTime = function() { return this.drinkTime; }; User.prototype.getLastActivity = function() { return this.lastActivity; }; User.prototype.getLastWarning = function() { if (this.lastWarning === null) { return false; } else { return this.lastWarning; } }; User.prototype.getUser = function() { return this.user; }; User.prototype.getWarningCount = function() { return this.afkWarningCount; }; User.prototype.getIsDj = function() { var DJs, dj, _i, _len; DJs = API.getDJs(); for (_i = 0, _len = DJs.length; _i < _len; _i++) { dj = DJs[_i]; if (this.user.id === dj.id) { return true; } } return false; }; User.prototype.warn = function() { this.afkWarningCount++; return this.lastWarning = new Date(); }; User.prototype.notDj = function() { this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.inRoom = function(online) { return this.isInRoom = online; }; User.prototype.updateVote = function(v) { if (this.isInRoom) { return data.voteLog[this.user.id][data.currentsong.id] = v; } }; return User; })(); RoomHelper = (function() { function RoomHelper() {} RoomHelper.prototype.lookupUser = function(username) { var id, u, _ref; _ref = data.users; for (id in _ref) { u = _ref[id]; if (u.getUser().username === username) { return u.getUser(); } } return false; }; RoomHelper.prototype.userVoteRatio = function(user) { var songId, songVotes, vote, votes; songVotes = data.voteLog[user.id]; votes = { 'woot': 0, 'meh': 0 }; for (songId in songVotes) { vote = songVotes[songId]; if (vote === 1) { votes['woot']++; } else if (vote === -1) { votes['meh']++; } } votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2); return votes; }; return RoomHelper; })(); pupOnline = function() { var currentversion, me, myname; me = API.getSelf(); myname = me.username; currentversion = "1.0.0"; log("BOT editado pelo Rafal Moraes versão " + currentversion + " Chupa Jô"); return API.sendChat("/me on"); }; populateUserData = function() { var u, users, _i, _len; users = API.getUsers(); for (_i = 0, _len = users.length; _i < _len; _i++) { u = users[_i]; data.users[u.id] = new User(u); data.voteLog[u.id] = {}; } }; initEnvironment = function() { document.getElementById("button-vote-positive").click(); document.getElementById("button-sound").click(); Playback.streamDisabled = true; return Playback.stop(); }; initialize = function() { pupOnline(); populateUserData(); initEnvironment(); initHooks(); data.startup(); data.newSong(); return data.startAfkInterval(); }; afkCheck = function() { var DJs, id, lastActivity, lastWarned, now, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, _ref, _results; _ref = data.users; _results = []; for (id in _ref) { user = _ref[id]; now = new Date(); lastActivity = user.getLastActivity(); timeSinceLastActivity = now.getTime() - lastActivity.getTime(); if (timeSinceLastActivity > data.afkTime) { if (user.getIsDj()) { secsLastActive = timeSinceLastActivity / 1000; if (user.getWarningCount() === 0) { user.warn(); _results.push(API.sendChat("@" + user.getUser().username + ", Você não falou no chat nos ultimos 30 minutos, por favor fale alguma coisa em 4 minutos ou será kickado da line de dj.")); } else if (user.getWarningCount() === 1) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); twoMinutes = 4 * 60 * 1000; if (timeSinceLastWarning > twoMinutes) { DJs = API.getDJs(); if (DJs.length > 0 && DJs[0].id !== user.getUser().id) { API.sendChat("@" + user.getUser().username + ", você foi avisado, fique ativo enquanto está na line."); API.moderateRemoveDJ(id); _results.push(user.warn()); } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(user.notDj()); } } else { _results.push(void 0); } } return _results; }; msToStr = function(msTime) { var ms, msg, timeAway; msg = ''; timeAway = { 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0 }; ms = { 'day': 24 * 60 * 60 * 1000, 'hour': 60 * 60 * 1000, 'minute': 60 * 1000, 'second': 1000 }; if (msTime > ms['day']) { timeAway['days'] = Math.floor(msTime / ms['day']); msTime = msTime % ms['day']; } if (msTime > ms['hour']) { timeAway['hours'] = Math.floor(msTime / ms['hour']); msTime = msTime % ms['hour']; } if (msTime > ms['minute']) { timeAway['minutes'] = Math.floor(msTime / ms['minute']); msTime = msTime % ms['minute']; } if (msTime > ms['second']) { timeAway['seconds'] = Math.floor(msTime / ms['second']); } if (timeAway['days'] !== 0) { msg += timeAway['days'].toString() + 'd'; } if (timeAway['hours'] !== 0) { msg += timeAway['hours'].toString() + 'h'; } if (timeAway['minutes'] !== 0) { msg += timeAway['minutes'].toString() + 'm'; } if (timeAway['seconds'] !== 0) { msg += timeAway['seconds'].toString() + 's'; } if (msg !== '') { return msg; } else { return false; } }; Command = (function() { function Command(msgData) { this.msgData = msgData; this.init(); } Command.prototype.init = function() { this.parseType = null; this.command = null; return this.rankPrivelege = null; }; Command.prototype.functionality = function(data) {}; Command.prototype.hasPrivelege = function() { var user; user = data.users[this.msgData.fromID].getUser(); switch (this.rankPrivelege) { case 'host': return user.permission >= 5; case 'cohost': return user.permission >= 4; case 'mod': return user.permission >= 3; case 'manager': return user.permission >= 3; case 'bouncer': return user.permission >= 2; case 'featured': return user.permission >= 1; default: return true; } }; Command.prototype.commandMatch = function() { var command, msg, _i, _len, _ref; msg = this.msgData.message; if (typeof this.command === 'string') { if (this.parseType === 'exact') { if (msg === this.command) { return true; } else { return false; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, this.command.length) === this.command) { return true; } else { return false; } } else if (this.parseType === 'contains') { if (msg.indexOf(this.command) !== -1) { return true; } else { return false; } } } else if (typeof this.command === 'object') { _ref = this.command; for (_i = 0, _len = _ref.length; _i < _len; _i++) { command = _ref[_i]; if (this.parseType === 'exact') { if (msg === command) { return true; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, command.length) === command) { return true; } } else if (this.parseType === 'contains') { if (msg.indexOf(command) !== -1) { return true; } } } return false; } }; Command.prototype.evalMsg = function() { if (this.commandMatch() && this.hasPrivelege()) { this.functionality(); return true; } else { return false; } }; return Command; })(); newsCommand = (function(_super) { __extends(newsCommand, _super); function newsCommand() { _ref = newsCommand.__super__.constructor.apply(this, arguments); return _ref; } newsCommand.prototype.init = function() { this.command = '!cotas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newsCommand.prototype.functionality = function() { var msg; msg = "/me Acaba de Ativar modo Cota e roubou sua vaga na Faculdade e sua vez na Cabine de DJ!"; return API.sendChat(msg); }; return newsCommand; })(Command); newSongsCommand = (function(_super) { __extends(newSongsCommand, _super); function newSongsCommand() { _ref1 = newSongsCommand.__super__.constructor.apply(this, arguments); return _ref1; } newSongsCommand.prototype.init = function() { this.command = '!musicanovas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newSongsCommand.prototype.functionality = function() { var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2; mChans = this.memberChannels.slice(0); chans = this.channels.slice(0); arts = this.artists.slice(0); chooseRandom = function(list) { var l, r; l = list.length; r = Math.floor(Math.random() * l); return list.splice(r, 1); }; selections = { channels: [], artist: '' }; u = data.users[this.msgData.fromID].getUser().username; if (u.indexOf("MistaDubstep") !== -1) { selections['channels'].push('MistaDubstep'); } else if (u.indexOf("Underground Promotions") !== -1) { selections['channels'].push('UndergroundDubstep'); } else { selections['channels'].push(chooseRandom(mChans)); } selections['channels'].push(chooseRandom(chans)); selections['channels'].push(chooseRandom(chans)); cMedia = API.getMedia(); if (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0) { selections['artist'] = cMedia.author; } else { selections['artist'] = chooseRandom(arts); } msg = "Querem musica de Dubstep do " + selections['artist'] + " entre! Tem musicas nova sempre em http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " ou http://youtube.com/" + selections['channels'][2]; return API.sendChat(msg); }; newSongsCommand.prototype.memberChannels = ["MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.channels = ["BassRape", "MonstercatMedia", "UKFdubstep", "DropThatBassline", "VitalDubstep", "AirwaveDubstepTV", "InspectorDubplate", "TehDubstepChannel", "UNITEDubstep", "LuminantNetwork", "TheSoundIsle", "PandoraMuslc", "MrSuicideSheep", "HearTheSensation", "bassoutletpromos", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.artists = ["Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"]; return newSongsCommand; })(Command); themeCommand = (function(_super) { __extends(themeCommand, _super); function themeCommand() { _ref2 = themeCommand.__super__.constructor.apply(this, arguments); return _ref2; } themeCommand.prototype.init = function() { this.command = '!tema'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; themeCommand.prototype.functionality = function() { var msg; msg = "Temas permitidos aqui na sala. electro, techno, "; msg += "dubstep."; return API.sendChat(msg); }; return themeCommand; })(Command); rulesCommand = (function(_super) { __extends(rulesCommand, _super); function rulesCommand() { _ref3 = rulesCommand.__super__.constructor.apply(this, arguments); return _ref3; } rulesCommand.prototype.init = function() { this.command = '!regras'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; rulesCommand.prototype.functionality = function() { var msg1, msg2; msg1 = " 1) Video no Maximo 6 minutos. "; msg1 += " 2) Sem Flood! "; msg1 += " 3) Nao escrever em colorido "; msg1 += " 4) Respeitar os Adms e Mods;s "; msg1 += " 5) Nao Fiquem Pedindo Cargos "; msg2 = "Curta: http://www.facebook.com/EspecialistasDasZoeiras?ref=hl"; msg2 += ""; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return rulesCommand; })(Command); roomHelpCommand = (function(_super) { __extends(roomHelpCommand, _super); function roomHelpCommand() { _ref4 = roomHelpCommand.__super__.constructor.apply(this, arguments); return _ref4; } roomHelpCommand.prototype.init = function() { this.command = '!ajuda'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; roomHelpCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Bem vindo a Sala! Para ser o DJ, Criar uma lista de reprodução e coloque Musica do Youtube ou soundcloud. "; msg1 += "Se é novo procure pelo seu nome na sua tela (do lado da cabine de dj e clique) e depois mude o nome."; msg2 = "Para Ganhar Pontos é só clica em Bacana. "; msg2 += "Digite !regras pare ler as porra das regras."; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return roomHelpCommand; })(Command); afksCommand = (function(_super) { __extends(afksCommand, _super); function afksCommand() { _ref5 = afksCommand.__super__.constructor.apply(this, arguments); return _ref5; } afksCommand.prototype.init = function() { this.command = '!afks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; afksCommand.prototype.functionality = function() { var dj, djAfk, djs, msg, now, _i, _len; msg = ''; djs = API.getDJs(); for (_i = 0, _len = djs.length; _i < _len; _i++) { dj = djs[_i]; now = new Date(); djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime(); if (djAfk > (5 * 60 * 1000)) { if (msToStr(djAfk) !== false) { msg += dj.username + ' - ' + msToStr(djAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Se fudeu não tem ninguém AFK."); } else { return API.sendChat('AFKs: ' + msg); } }; return afksCommand; })(Command); allAfksCommand = (function(_super) { __extends(allAfksCommand, _super); function allAfksCommand() { _ref6 = allAfksCommand.__super__.constructor.apply(this, arguments); return _ref6; } allAfksCommand.prototype.init = function() { this.command = '!todosafks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; allAfksCommand.prototype.functionality = function() { var msg, now, u, uAfk, usrs, _i, _len; msg = ''; usrs = API.getUsers(); for (_i = 0, _len = usrs.length; _i < _len; _i++) { u = usrs[_i]; now = new Date(); uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime(); if (uAfk > (10 * 60 * 1000)) { if (msToStr(uAfk) !== false) { msg += u.username + ' - ' + msToStr(uAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Se fudeu não tem ninguém AFK."); } else { return API.sendChat('AFKs: ' + msg); } }; return allAfksCommand; })(Command); statusCommand = (function(_super) { __extends(statusCommand, _super); function statusCommand() { _ref7 = statusCommand.__super__.constructor.apply(this, arguments); return _ref7; } statusCommand.prototype.init = function() { this.command = '!status'; this.parseType = 'exact'; return this.rankPrivelege = 'featured'; }; statusCommand.prototype.functionality = function() { var day, hour, launch, lt, meridian, min, month, msg, t, totals; lt = data.launchTime; month = lt.getMonth() + 1; day = lt.getDate(); hour = lt.getHours(); meridian = hour % 12 === hour ? 'AM' : 'PM'; min = lt.getMinutes(); min = min < 10 ? '0' + min : min; t = data.totalVotingData; t['songs'] = data.songCount; launch = 'Iniciada em ' + month + '/' + day + ' ' + hour + ':' + min + ' ' + meridian + '. '; totals = '' + t.songs + ' Teve: :+1: ' + t.woots + ',:-1: ' + t.mehs + ',:heart: ' + t.curates + '.' msg = launch + totals; return API.sendChat(msg); }; return statusCommand; })(Command); dieCommand = (function(_super) { __extends(dieCommand, _super); function dieCommand() { _ref8 = dieCommand.__super__.constructor.apply(this, arguments); return _ref8; } dieCommand.prototype.init = function() { this.command = '!adeus'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; dieCommand.prototype.functionality = function() { API.sendChat("Acho que fui envenenado!"); undoHooks(); API.sendChat("Vish,"); data.implode(); return API.sendChat("Morri! x_x"); }; return dieCommand; })(Command); reloadCommand = (function(_super) { __extends(reloadCommand, _super); function reloadCommand() { _ref9 = reloadCommand.__super__.constructor.apply(this, arguments); return _ref9; } reloadCommand.prototype.init = function() { this.command = '!reload'; this.parseType = 'exact'; return this.rankPrivelege = 'Host'; }; reloadCommand.prototype.functionality = function() { var pupSrc; API.sendChat('/me Não se Preocupe o Papai Chegou'); undoHooks(); pupSrc = data.pupScriptUrl; data.implode(); return $.getScript(pupSrc); }; return reloadCommand; })(Command); lockCommand = (function(_super) { __extends(lockCommand, _super); function lockCommand() { _ref10 = lockCommand.__super__.constructor.apply(this, arguments); return _ref10; } lockCommand.prototype.init = function() { this.command = '!trava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; lockCommand.prototype.functionality = function() { return data.lockBooth(); }; return lockCommand; })(Command); unlockCommand = (function(_super) { __extends(unlockCommand, _super); function unlockCommand() { _ref11 = unlockCommand.__super__.constructor.apply(this, arguments); return _ref11; } unlockCommand.prototype.init = function() { this.command = '!destrava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; unlockCommand.prototype.functionality = function() { return data.unlockBooth(); }; return unlockCommand; })(Command); removeCommand = (function(_super) { __extends(removeCommand, _super); function removeCommand() { _ref12 = removeCommand.__super__.constructor.apply(this, arguments); return _ref12; } removeCommand.prototype.init = function() { this.command = '!remove'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; removeCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return removeCommand; })(Command); addCommand = (function(_super) { __extends(addCommand, _super); function addCommand() { _ref13 = addCommand.__super__.constructor.apply(this, arguments); return _ref13; } addCommand.prototype.init = function() { this.command = '!add'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; addCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { API.moderateAddDJ(user.id); return setTimeout((function() { return data.unlockBooth(); }), 5000); } } }; return addCommand; })(Command); skipCommand = (function(_super) { __extends(skipCommand, _super); function skipCommand() { _ref14 = skipCommand.__super__.constructor.apply(this, arguments); return _ref14; } skipCommand.prototype.init = function() { this.command = '!pula'; this.parseType = 'exact'; this.rankPrivelege = 'bouncer'; return window.lastSkipTime; }; skipCommand.prototype.functionality = function() { var currentTime, millisecondsPassed; currentTime = new Date(); if (!window.lastSkipTime) { API.moderateForceSkip(); return window.lastSkipTime = currentTime; } else { millisecondsPassed = Math.round(currentTime.getTime() - window.lastSkipTime.getTime()); if (millisecondsPassed > 10000) { window.lastSkipTime = currentTime; return API.moderateForceSkip(); } } }; return skipCommand; })(Command); disconnectLookupCommand = (function(_super) { __extends(disconnectLookupCommand, _super); function disconnectLookupCommand() { _ref15 = disconnectLookupCommand.__super__.constructor.apply(this, arguments); return _ref15; } disconnectLookupCommand.prototype.init = function() { this.command = '!dcmembros'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; disconnectLookupCommand.prototype.functionality = function() { var cmd, dcHour, dcLookupId, dcMeridian, dcMins, dcSongsAgo, dcTimeStr, dcUser, disconnectInstances, givenName, id, recentDisconnect, resp, u, _i, _len, _ref16, _ref17; cmd = this.msgData.message; if (cmd.length > 11) { givenName = cmd.slice(11); _ref16 = data.users; for (id in _ref16) { u = _ref16[id]; if (u.getUser().username === givenName) { dcLookupId = id; disconnectInstances = []; _ref17 = data.userDisconnectLog; for (_i = 0, _len = _ref17.length; _i < _len; _i++) { dcUser = _ref17[_i]; if (dcUser.id === dcLookupId) { disconnectInstances.push(dcUser); } } if (disconnectInstances.length > 0) { resp = u.getUser().username + ' disconectou ' + disconnectInstances.length.toString() + ' '; if (disconnectInstances.length === 1) { resp += '. '; } else { resp += 's. '; } recentDisconnect = disconnectInstances.pop(); dcHour = recentDisconnect.time.getHours(); dcMins = recentDisconnect.time.getMinutes(); if (dcMins < 10) { dcMins = '0' + dcMins.toString(); } dcMeridian = dcHour % 12 === dcHour ? 'AM' : 'PM'; dcTimeStr = '' + dcHour + ':' + dcMins + ' ' + dcMeridian; dcSongsAgo = data.songCount - recentDisconnect.songCount; resp += 'O seu disconect mais recente foi á ' + dcTimeStr + ' (' + dcSongsAgo + ' músicas atras). '; if (recentDisconnect.waitlistPosition !== void 0) { resp += 'Ele estava ' + recentDisconnect.waitlistPosition + ' música'; if (recentDisconnect.waitlistPosition > 1) { resp += 's'; } resp += ' atras da cabine de dj.'; } else { resp += 'Ele não estava na cabine de dj.'; } API.sendChat(resp); return; } else { API.sendChat(" " + u.getUser().username + " não disconectou."); return; } } } return API.sendChat("Eu não vejo essa pessoa na sala '" + givenName + "'."); } }; return disconnectLookupCommand; })(Command); voteRatioCommand = (function(_super) { __extends(voteRatioCommand, _super); function voteRatioCommand() { _ref16 = voteRatioCommand.__super__.constructor.apply(this, arguments); return _ref16; } voteRatioCommand.prototype.init = function() { this.command = '!voteratio'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; voteRatioCommand.prototype.functionality = function() { var msg, name, r, u, votes; r = new RoomHelper(); msg = this.msgData.message; if (msg.length > 12) { name = msg.substr(12); u = r.lookupUser(name); if (u !== false) { votes = r.userVoteRatio(u); msg = u.username + " :+1: " + votes['woot'].toString() + " vez"; if (votes['woot'] === 1) { msg += ', '; } else { msg += 'es, '; } msg += "e :-1: " + votes['meh'].toString() + " veze"; if (votes['meh'] === 1) { msg += '. '; } else { msg += 'es. '; } msg += "O seu vote ratio é: " + votes['positiveRatio'].toString() + "."; return API.sendChat(msg); } else { return API.sendChat("Não parece ter alguém com esse nome de'" + name + "'"); } } else { return API.sendChat("Você quer alguma coisa? Ou você está apenas tentando me irritar."); } }; return voteRatioCommand; })(Command); avgVoteRatioCommand = (function(_super) { __extends(avgVoteRatioCommand, _super); function avgVoteRatioCommand() { _ref17 = avgVoteRatioCommand.__super__.constructor.apply(this, arguments); return _ref17; } avgVoteRatioCommand.prototype.init = function() { this.command = '!avgvoteratio'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; avgVoteRatioCommand.prototype.functionality = function() { var averageRatio, msg, r, ratio, roomRatios, uid, user, userRatio, votes, _i, _len, _ref18; roomRatios = []; r = new RoomHelper(); _ref18 = data.voteLog; for (uid in _ref18) { votes = _ref18[uid]; user = data.users[uid].getUser(); userRatio = r.userVoteRatio(user); roomRatios.push(userRatio['positiveRatio']); } averageRatio = 0.0; for (_i = 0, _len = roomRatios.length; _i < _len; _i++) { ratio = roomRatios[_i]; averageRatio += ratio; } averageRatio = averageRatio / roomRatios.length; msg = "Accounting for " + roomRatios.length.toString() + " user ratios, the average room ratio is " + averageRatio.toFixed(2).toString() + "."; return API.sendChat(msg); }; return avgVoteRatioCommand; })(Command); staffCommand = (function(_super) { __extends(staffCommand, _super); function staffCommand() { _ref18 = staffCommand.__super__.constructor.apply(this, arguments); return _ref18; } staffCommand.prototype.init = function() { this.command = '!staff'; this.parseType = 'exact'; this.rankPrivelege = 'user'; return window.lastActiveStaffTime; }; staffCommand.prototype.staff = function() { var now, staff, staffAfk, stringstaff, user, _i, _len; staff = API.getStaff(); now = new Date(); stringstaff = ""; for (_i = 0, _len = staff.length; _i < _len; _i++) { user = staff[_i]; if (user.permission > 1) { staffAfk = now.getTime() - data.users[user.id].getLastActivity().getTime(); if (staffAfk < (60 * 60 * 1000)) { stringstaff += "@" + user.username + " "; } } } if (stringstaff.length === 0) { stringstaff = "Aff pqp não tem staff ativo :'("; } return stringstaff; }; staffCommand.prototype.functionality = function() { var currentTime, millisecondsPassed, thestaff; thestaff = this.staff(); currentTime = new Date(); if (!window.lastActiveStaffTime) { API.sendChat(thestaff); return window.lastActiveStaffTime = currentTime; } else { millisecondsPassed = currentTime.getTime() - window.lastActiveStaffTime.getTime(); if (millisecondsPassed > 10000) { window.lastActiveStaffTime = currentTime; return API.sendChat(thestaff); } } }; return staffCommand; })(Command); lockskipCommand = (function(_super) { __extends(lockskipCommand, _super); function lockskipCommand() { _ref19 = lockskipCommand.__super__.constructor.apply(this, arguments); return _ref19; } lockskipCommand.prototype.init = function() { this.command = '!repetida'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; lockskipCommand.prototype.functionality = function() { return data.lockBooth(function() { return setTimeout(function() {}, API.moderateForceSkip(), setTimeout(function() { return data.unlockBooth(); }, 5000), 5000); }); }; return lockskipCommand; })(Command); channelCommand = (function(_super) { __extends(channelCommand, _super); function channelCommand() { _ref20 = channelCommand.__super__.constructor.apply(this, arguments); return _ref20; } channelCommand.prototype.init = function() { this.command = '!comandos'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; channelCommand.prototype.functionality = function() { return API.sendChat("/em: Lista de comandos: https://www.google.com.br/ _|_"); }; return channelCommand; })(Command); versionCommand = (function(_super) { __extends(versionCommand, _super); function versionCommand() { _ref21 = versionCommand.__super__.constructor.apply(this, arguments); return _ref21; } versionCommand.prototype.init = function() { this.command = '!version'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; versionCommand.prototype.functionality = function() { return API.sendChat("/me BOT editado 1.0 " + currentversion); }; return versionCommand; })(Command); cmds = [newSongsCommand, themeCommand, rulesCommand, roomHelpCommand, afksCommand, allAfksCommand, statusCommand, dieCommand, reloadCommand, lockCommand, unlockCommand, removeCommand, addCommand, skipCommand, disconnectLookupCommand, voteRatioCommand, avgVoteRatioCommand, staffCommand, lockskipCommand, versionCommand, newsCommand, channelCommand]; chatCommandDispatcher = function(chat) { var c, cmd, _i, _len, _results; chatUniversals(chat); _results = []; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(chat); if (c.evalMsg()) { break; } else { _results.push(void 0); } } return _results; }; updateVotes = function(obj) { data.currentwoots = obj.positive; data.currentmehs = obj.negative; return data.currentcurates = obj.curates; }; announceCurate = function(obj) { return APIsendChat("/em: " + obj.user.username + " Gostou dessa Musica!"); }; handleUserJoin = function(user) { data.userJoin(user); return data.users[user.id].updateActivity(); }; handleNewSong = function(obj) { var songId; data.intervalMessages(); if (data.currentsong === null) { data.newSong(); } else { API.sendChat("/em: " + data.currentsong.title + " por " + data.currentsong.author + ". :+1: " + data.currentwoots + ", :-1: " + data.currentmehs + ", :heart: " + data.currentcurates + "."); data.newSong(); document.getElementById("button-vote-positive").click(); } if (data.forceSkip) { songId = obj.media.id; return setTimeout(function() { var cMedia; cMedia = API.getMedia(); if (cMedia.id === songId) { return API.moderateForceSkip(); } }, obj.media.duration * 1000); } }; handleVote = function(obj) { return data.users[obj.user.id].updateVote(obj.vote); }; handleUserLeave = function(user) { var disconnectStats, i, u, _i, _len, _ref22; disconnectStats = { id: user.id, time: new Date(), songCount: data.songCount }; i = 0; _ref22 = data.internalWaitlist; for (_i = 0, _len = _ref22.length; _i < _len; _i++) { u = _ref22[_i]; if (u.id === user.id) { disconnectStats['waitlistPosition'] = i - 1; data.setInternalWaitlist(); break; } else { i++; } } data.userDisconnectLog.push(disconnectStats); return data.users[user.id].inRoom(false); }; antispam = function(chat) { var plugRoomLinkPatt, sender; plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(chat.message)) { sender = API.getUser(chat.fromID); if (!sender.ambassador && !sender.moderator && !sender.owner && !sender.superuser) { if (!data.users[chat.fromID]["protected"]) { API.sendChat("Sem spam seu preto"); return API.moderateDeleteChat(chat.chatID); } else { return API.sendChat("Eu deveria expulsá-lo, mas estamos aqui para se diverti!"); } } } }; fans = function(chat) { var msg; msg = chat.message.toLowerCase(); if (msg.indexOf('eowkreowr') !== -1 || msg.indexOf('dsjaodas') !== -1 || msg.indexOf('poekpower') !== -1 || msg.indexOf('fokdsofsdpof') !== -1 || msg.indexOf(':trollface:') !== -1 || msg.indexOf('autowoot:') !== -1) { return API.moderateDeleteChat(chat.chatID); } }; chatUniversals = function(chat) { data.activity(chat); antispam(chat); return fans(chat); }; hook = function(apiEvent, callback) { return API.addEventListener(apiEvent, callback); }; unhook = function(apiEvent, callback) { return API.removeEventListener(apiEvent, callback); }; apiHooks = [ { 'event': API.ROOM_SCORE_UPDATE, 'callback': updateVotes }, { 'event': API.CURATE_UPDATE, 'callback': announceCurate }, { 'event': API.USER_JOIN, 'callback': handleUserJoin }, { 'event': API.DJ_ADVANCE, 'callback': handleNewSong }, { 'event': API.VOTE_UPDATE, 'callback': handleVote }, { 'event': API.CHAT, 'callback': chatCommandDispatcher }, { 'event': API.USER_LEAVE, 'callback': handleUserLeave } ]; initHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(hook(pair['event'], pair['callback'])); } return _results; }; undoHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(unhook(pair['event'], pair['callback'])); } return _results; }; initialize(); }).call(this); delay(); loadDammit(); function delay() { setTimeout("load();", 6000); } function load() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://cookies.googlecode.com/svn/trunk/jaaulde.cookies.js'; script.onreadystatechange = function() { if (this.readyState == 'complete') { loaded(); } } script.onload = readCookies; head.appendChild(script); } function loaded() { loaded = true } function loadDammit() { if (loaded == true) { readCookies(); } } function readCookies() { var currentDate = new Date(); currentDate.setFullYear(currentDate.getFullYear() + 1); var newOptions = { expiresAt: currentDate } jaaulde.utils.cookies.setOptions(newOptions); var value = jaaulde.utils.cookies.get(COOKIE_WOOT); autowoot = value != null ? value : false; value = jaaulde.utils.cookies.get(COOKIE_QUEUE); autoqueue = value != null ? value : false; value = jaaulde.utils.cookies.set(COOKIE_STREAM); stream = value != null ? value : true; value = jaaulde.utils.cookies.get(COOKIE_HIDE_VIDEO); hideVideo = value != null ? value : false; onCookiesLoaded(); } function onCookiesLoaded() { if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6005); } if (autoqueue && !isInQueue()) { joinQueue(); } if (hideVideo) { $('#yt-frame').animate({'height': (hideVideo ? '0px' : '271px')}, {duration: 'fast'}); $('#playback .frame-background').animate({'opacity': (hideVideo ? '0' : '0.91')}, {duration: 'medium'}); } initAPIListeners(); displayUI(); initUIListeners(); populateUserlist(); } var words = { "Points" : "Beats!", "Now Playing" : "Now Spinning!", "Time Remaining" : "Time Remaining!", "Volume" : "Crank the Volume!", "Current DJ" : "Disk Jockey", "Crowd Response" : "Crowd Reaction!", "Fans":"Stalkers!"}; String.prototype.prepareRegex = function() { return this.replace(/([[]^&\$.()\?\/\+{}|])/g, "\$1"); }; function isOkTag(tag) { return (",pre,blockquote,code,input,button,textarea".indexOf(","+tag) == -1); } var regexs=new Array(), replacements=new Array(); for(var word in words) { if(word != "") { regexs.push(new RegExp("\b"+word.prepareRegex().replace(/*/g,'[^ ]*')+"\b", 'gi')); replacements.push(words[word]); } } var texts = document.evaluate(".//text()[normalize-space(.)!='']",document.body,null,6,null), text=""; for(var i=0,l=texts.snapshotLength; (this_text=texts.snapshotItem(i)); i++) { if(isOkTag(this_text.parentNode.tagName.toLowerCase()) && (text=this_text.textContent)) { for(var x=0,l=regexs.length; x<l; x++) { text = text.replace(regexs[x], replacements[x]); this_text.textContent = text; } } } var loaded = false; var mentioned = false; var clicked = false; var skipped = false; var timeToWait = 120000; var clickWait = 5000; var skipWait = 601; var timePassed = 0; var clickPassed = 0; var skipPassed = 0; var timer = null; var clickTimer = null; var skipTimer = null; var COOKIE_WOOT = 'autowoot'; var COOKIE_QUEUE = 'autoqueue'; var COOKIE_STREAM = 'stream'; var COOKIE_HIDE_VIDEO = 'hidevideo'; var MAX_USERS_WAITLIST = 50; var fbMsg = ["Entrem na Pagina da sala: https://www.facebook.com/CantadasdiPedreiro"]; var rulesMsg = "Regras: 1) Video no Maximo 6 minutos. 2) Sem Flood! 3) Nao escrever em colorido 4) Respeitar os Adms e Mods ;s 5) Nao Fiquem Pedindo Cargos. "; var skipMsg = ["por favor não pedir para pular as músicas, quer pular da deslike."]; var fansMsg = ["Virem meu Fan que eu retribuo vocês, não esqueça de da @ Menções"]; var wafflesMsg = ["Ppkas para todos! # - (> _ <) - # "," Alguém disse ppkas? # - (> _ <) - #"]; var bhvMsg = ["por favor, não sejam gays no bate-papo "," por favor, não fale assim, controlar a si mesmo! "," por favor, seja maduros fdps"]; var sleepMsg = ["Ta na hora de dormi, Fui virjs! "," Indo dormir agora "," estou tão cansado, durmi é necessário, fui me cama. "," cansaço ... sono ... e ... fui me dormir."]; var workMsg = ["Estou ocupado não sou Vagabundo igual a vocês."]; var afkMsg = ["Eu estou indo embora e um Vão se foderem."," Vou fica AFK por um tempo, volto em breve! "," Indo embora, volto em breve! "," Vou Viaja nas galáxia, estarei de volta em breve !"]; var backMsg = ["Estou de volta minhas putinhas! "," Adivinha quem está de volta? Quem sera? Claro que é eu o seu Pai :D"]; var autoAwayMsg = ["Atualmente estou AFK "," Eu estou AFK "," Eu estou em uma aventura (afk) "," desapareceu por um momento "," não está presente no teclado."]; var autoSlpMsg = ["Atualmente estou dormindo "," Estou comendo ppkas em meus sonhos"]; var autoWrkMsg = ["Atualmente estou ocupado "," estou ocupado "," fazendo um trabalho relacionado a ppkas."]; overPlayed = ["1:vZyenjZseXA", "1:ZT4yoZNy90s", "1:Bparw9Jo3dk", "1:KrVC5dm5fFc","1:Ys9sIqv42lo", "1:1y6smkh6c-0", "1:jZL-RUZUoGY", "1:CrdoD9T1Heg", "1:6R_Rn1iP82I", "1:ea9tluQ_QtE", "1:f9EM8T5K6d8", "1:aHjpOzsQ9YI", "1:3vC5TsSyNjU", "1:yXLL46xkdlY", "1:_t2TzJOyops", "1:BGpzGu9Yp6Y", "1:YJVmu6yttiw", "1:WSeNSzJ2-Jw", "1:2cXDgFwE13g", "1:PR_u9rvFKzE", "1:i1BDGqIfm8U"];overPlayed = ["1:vZyenjZseXA", "1:ZT4yoZNy90s", "1:Bparw9Jo3dk", "1:KrVC5dm5fFc","1:Ys9sIqv42lo", "1:1y6smkh6c-0", "1:jZL-RUZUoGY", "1:CrdoD9T1Heg", "1:6R_Rn1iP82I", "1:ea9tluQ_QtE", "1:f9EM8T5K6d8", "1:aHjpOzsQ9YI", "1:3vC5TsSyNjU", "1:yXLL46xkdlY", "1:_t2TzJOyops", "1:BGpzGu9Yp6Y", "1:YJVmu6yttiw", "1:WSeNSzJ2-Jw", "1:2cXDgFwE13g", "1:PR_u9rvFKzE", "1:i1BDGqIfm8U"]; var styles = [ '.sidebar {position: fixed; top: 0; height: 100%; width: 200px; z-index: 99999; background-image: linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -o-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -moz-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -ms-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000000),color-stop(1, #3B5678));}', '.sidebar#side-right {right: -190px;z-index: 99999;}', '.sidebar#side-left {left: -190px; z-index: 99999; }', '.sidebar-handle {width: 12px;height: 100%;z-index: 99999;margin: 0;padding: 0;background: rgb(96, 141, 197);box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .9);cursor: "ne-resize";}', '.sidebar-handle span {display: block;position: absolute;width: 10px;top: 50%;text-align: center;letter-spacing: -1px;color: #000;}', '.sidebar-content {position: absolute;width: 185px;height: 100%; padding-left: 15px}', '.sidebar-content2 {position: absolute;width: 185px;height: 100%;}', '.sidebar-content2 h3 {font-weight: bold; padding-left: 5px; padding-bottom: 5px; margin: 0;}', '.sidebar-content2 a {font-weight: bold; font-size: 13px; padding-left: 5px;}', '#side-right .sidebar-handle {float: left;}', '#side-left .sidebar-handle {float: right;}', '#side-right a {display: block;min-width: 100%;cursor: pointer;padding: 4px 5px 8px 5px;border-radius: 4px;font-size: 13px;}', '.sidebar-content2 span {display: block; min-width: 94%;cursor: pointer;border-radius: 4px; padding: 0 5px 0 5px; font-size: 12px;}', '#side-right a span {padding-right: 8px;}', '#side-right a:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}', '.sidebar-content2 span:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}', '.sidebar-content2 a:hover {text-decoration: none;}', 'html{background: url("http://i.imgur.com/a75C9wE.jpg") no-repeat scroll center top #000000;}', '#room-wheel {z-index: 2;position: absolute;top: 2px;left: 0;width: 1044px;height: 394px;background: url(http://) no-repeat;display: none;}', '.chat-bouncer {background: url(http://i.imgur.com/9qWWO4L.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '.chat-manager{background: url(http://i.imgur.com/hqqhTcp.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '.chat-cohost {background: url(https://dl.dropbox.com/u/67634625/chat-bouncer-icon.png) no-repeat 0 5px;padding-left: 17px;width:292px;}', '.chat-host{background: url(https://dl.dropbox.com/u/67634625/chat-bouncer-icon.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '#dj-console, #dj-console {background-image: url(http://s8.postimage.org/wpugb8gc5/Comp_2.gif);min-height:33px;min-width:131px;}', '.chat-from-you{color: #0099FF;font-weight: bold;margin-top: 0px; padding-top: 0px;}', '.chat-from-bouncer{color: #800080; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-manager{color: #FFDAB9; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-cohost{color: #FF4500; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-host{color: #32CD32;font-weight: bold;margin-top: 0px; padding-top: 0px;}', '#user-points-title{color: #FFFFFF; position: absolute; left: 36px; font-size: 10px;}', '#user-fans-title{color: #FFFFFF; position: absolute; left: 29px; font-size: 10px;}', '.meta-header span{color: rgba(255, 255, 255, 0.79); position: absolute; left: 15px; font-size: 10px;}', '#button-lobby {background-image: url("http://i.imgur.com/brpRaSY.png");}', '#volume-bar-value{background-image: url("http://i.imgur.com/xmyonON.png") ;}', '#hr-div {;height: 100%;width: 100%;margin: 0;padding-left: 12px;}', '#hr2-div2 {;height: 100%;width: 100%;margin: 0;}', '#hr-style {position: absolute;display: block;height: 20px;width: 100%;bottom: 0%;background-image: url("http://i.imgur.com/gExgamX.png");}', '#hr2-style2 {position: absolute;display: block;height: 20px;width: 94%%;bottom: 0%;background-image: url("http://i.imgur.com/gExgamX.png");}', '#side-left h3 {padding-left: 5px}', ]; var scripts = [ "(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind('mousemove',track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=='mouseenter'){pX=ev.pageX;pY=ev.pageY;$(ob).bind('mousemove',track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind('mousemove',track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);", 'if (jQuery.easing.easeOutQuart === undefined) jQuery.easing.easeOutQuart = function (a,b,c,d,e) { return -d*((b=b/e-1)*b*b*b-1)+c; }', '$("#side-right")', ' .hoverIntent(function() {', ' var timeout_r = $(this)', ' .data("timeout_r");', ' if (timeout_r) {', ' clearTimeout(timeout_r);', ' }', ' $(this)', ' .animate({', ' "right": "0px"', ' }, 300, "easeOutQuart");', ' }, function() {', ' $(this)', ' .data("timeout_r", setTimeout($.proxy(function() {', ' $(this)', ' .animate({', ' "right": "-190px"', ' }, 300, "easeOutQuart");', ' }, this), 500));', ' });', '$("#side-left")', ' .hoverIntent(function() {', ' var timeout_r = $(this)', ' .data("timeout_r");', ' if (timeout_r) {', ' clearTimeout(timeout_r);', ' }', ' $(this)', ' .animate({', ' "left": "0px"', ' }, 300, "easeOutQuart");', ' }, function() {', ' $(this)', ' .data("timeout_r", setTimeout($.proxy(function() {', ' $(this)', ' .animate({', ' "left": "-190px"', ' }, 300, "easeOutQuart");', ' }, this), 500));', ' });' ]; function initAPIListeners() { API.addEventListener(API.DJ_ADVANCE, djAdvanced); API.addEventListener(API.CHAT, autoRespond); API.addEventListener(API.DJ_UPDATE, queueUpdate); API.addEventListener(API.VOTE_UPDATE, function (obj) { populateUserlist(); }); API.addEventListener(API.USER_JOIN, function (user) { populateUserlist(); }); API.addEventListener(API.USER_LEAVE, function (user) { populateUserlist(); }); } function displayUI() { var colorWoot = autowoot ? '#3FFF00' : '#ED1C24'; var colorQueue = autoqueue ? '#3FFF00' : '#ED1C24'; var colorStream = stream ? '#3FFF00' : '#ED1C24'; var colorVideo = hideVideo ? '#3FFF00' : '#ED1C24'; $('#side-right .sidebar-content').append( 'auto woot' + 'auto queue' + 'stream' + 'hide video' + 'rules' + 'like our fb' + 'no fans' + 'no skip' + 'waffles' + 'sleeping' + 'working' + 'afk' + 'available' + 'skip' + 'lock' + 'unlock' + 'lockskip' ); } function initUIListeners() { $("#plug-btn-woot").on("click", function() { autowoot = !autowoot; $(this).css("color", autowoot ? "#3FFF00" : "#ED1C24"); if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6001); } jaaulde.utils.cookies.set(COOKIE_WOOT, autowoot); }); $("#plug-btn-queue").on("click", function() { autoqueue = !autoqueue; $(this).css('color', autoqueue ? '#3FFF00' : '#ED1C24'); if (autoqueue && !isInQueue()) { joinQueue(); } jaaulde.utils.cookies.set(COOKIE_QUEUE, autoqueue); }); $("#plug-btn-stream").on("click", function() { stream = !stream; $(this).css("color", stream ? "#3FFF00" : "#ED1C24"); if (stream == true) { API.sendChat("/stream on"); } else { API.sendChat("/stream off"); } jaaulde.utils.cookies.set(COOKIE_STREAM, stream); }); $("#plug-btn-hidevideo").on("click", function() { hideVideo = !hideVideo; $(this).css("color", hideVideo ? "#3FFF00" : "#ED1C24"); $("#yt-frame").animate({"height": (hideVideo ? "0px" : "271px")}, {duration: "fast"}); $("#playback .frame-background").animate({"opacity": (hideVideo ? "0" : "0.91")}, {duration: "medium"}); jaaulde.utils.cookies.set(COOKIE_HIDE_VIDEO, hideVideo); }); $("#plug-btn-face").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(fbMsg[Math.floor(Math.random() * fbMsg.length)]); } }); $("#plug-btn-rules").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(rulesMsg); } }); $("#plug-btn-fans").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(fansMsg[Math.floor(Math.random() * fansMsg.length)]); } }); $("#plug-btn-noskip").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(skipMsg[Math.floor(Math.random() * skipMsg.length)]); } }); $("#plug-btn-waffles").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(wafflesMsg[Math.floor(Math.random() * wafflesMsg.length)]); } }); $("#plug-btn-sleeping").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 3) { API.sendChat(sleepMsg[Math.floor(Math.random() * sleepMsg.length)]); Models.user.changeStatus(3); } } }); $("#plug-btn-working").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 2) { API.sendChat(workMsg[Math.floor(Math.random() * workMsg.length)]); Models.user.changeStatus(2); } } }); $("#plug-btn-afk").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 1) { API.sendChat(afkMsg[Math.floor(Math.random() * afkMsg.length)]); Models.user.changeStatus(1); } } }); $("#plug-btn-back").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 0) { API.sendChat(backMsg[Math.floor(Math.random() * backMsg.length)]); Models.user.changeStatus(0); } } }); $("#plug-btn-skip").on("click", function() { if (skipped == false) { skipped = true; skipTimer = setInterval("checkSkipped();", 500); new ModerationForceSkipService; } }); $("#plug-btn-lock").on("click", function() { new RoomPropsService(document.location.href.split('/')[3],true,true,1,5); }); $("#plug-btn-unlock").on("click", function() { new RoomPropsService(document.location.href.split('/')[3],false,true,1,5); }); $("#plug-btn-lockskip").on("click", function() { if (skipped == false) { skipped = true; skipTimer = setInterval("checkSkipped();", 500); new RoomPropsService(document.location.href.split('/')[3],true,true,1,5); new ModerationForceSkipService; new RoomPropsService(document.location.href.split('/')[3],false,true,1,5); } }); } function queueUpdate() { if (autoqueue && !isInQueue()) { joinQueue(); } } function isInQueue() { var self = API.getSelf(); return API.getWaitList().indexOf(self) !== -1 || API.getDJs().indexOf(self) !== -1; } function joinQueue() { if ($('#button-dj-play').css('display') === 'block') { $('#button-dj-play').click(); } else if (API.getWaitList().length < MAX_USERS_WAITLIST) { API.waitListJoin(); } } function autoRespond(data) { var a = data.type == "mention" && Models.room.data.staff[data.fromID] && Models.room.data.staff[data.fromID] >= Models.user.BOUNCER, b = data.message.indexOf('@') >0; if (data.type == "mention" && mentioned == false) { if (API.getUser(data.fromID).status == 0) { mentioned = true; timer = setInterval("checkMentioned();", 1000); if (Models.user.data.status == 1) { API.sendChat("@" + data.from + " automsg: " + autoAwayMsg[Math.floor(Math.random() * autoAwayMsg.length)]); } if (Models.user.data.status ==2) { API.sendChat("@" + data.from + " automsg: " + autoWrkMsg[Math.floor(Math.random() * autoWrkMsg.length)]); } if (Models.user.data.status ==3) { API.sendChat("@" + data.from + " automsg: " + autoSlpMsg[Math.floor(Math.random() * autoSlpMsg.length)]); } } } } function djAdvanced(obj) { if (hideVideo) { $("#yt-frame").css("height", "0px"); $("#playback .frame-background").css("opacity", "0.0"); } if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6001); } setTimeout("overPlayedSongs();", 3000); } function overPlayedSongs(data) { if (overPlayed.indexOf(Models.room.data.media.id) > -1) { API.sendChat("/me auto skip ligado, Musica Repetida. Fuck you baby!"); setTimeout("new RoomPropsService(document.location.href.split('/')[3],true,true,1,5);", 300); setTimeout("new ModerationForceSkipService;", 600); setTimeout("new RoomPropsService(document.location.href.split('/')[3],false,true,1,5);", 900); } if (Models.room.data.media.duration > 481) { API.sendChat("/me auto skip ligado, música com mais de 6 minutos seram puladas."); setTimeout("new RoomPropsService(document.location.href.split('/')[3],true,true,1,5);", 300); setTimeout("new ModerationForceSkipService;", 600); setTimeout("new RoomPropsService(document.location.href.split('/')[3],false,true,1,5);", 900); } } function populateUserlist() { var mehlist = ''; var wootlist = ''; var undecidedlist = ''; var a = API.getUsers(); var totalMEHs = 0; var totalWOOTs = 0; var totalUNDECIDEDs = 0; var str = ''; var users = API.getUsers(); var myid = API.getSelf(); for (i in a) { str = '' + a[i].username + ''; if (typeof (a[i].vote) !== 'undefined' && a[i].vote == -1) { totalMEHs++; mehlist += str; } else if (typeof (a[i].vote) !== 'undefined' && a[i].vote == +1) { totalWOOTs++; wootlist += str; } else { totalUNDECIDEDs++; undecidedlist += str; } } var totalDECIDED = totalWOOTs + totalMEHs; var totalUSERS = totalDECIDED + totalUNDECIDEDs; var totalMEHsPercentage = Math.round((totalMEHs / totalUSERS) * 100); var totalWOOTsPercentage = Math.round((totalWOOTs / totalUSERS) * 100); if (isNaN(totalMEHsPercentage) || isNaN(totalWOOTsPercentage)) { totalMEHsPercentage = totalWOOTsPercentage = 0; } mehlist = ' ' + totalMEHs.toString() + ' (' + totalMEHsPercentage.toString() + '%)' + mehlist; wootlist = ' ' + totalWOOTs.toString() + ' (' + totalWOOTsPercentage.toString() + '%)' + wootlist; undecidedlist = ' ' + totalUNDECIDEDs.toString() + undecidedlist; if ($('#side-left .sidebar-content').children().length > 0) { $('#side-left .sidebar-content2').append(); } $('#side-left .sidebar-content2').html(' users: ' + API.getUsers().length + ' '); var spot = Models.room.getWaitListPosition(); var waitlistDiv = $(' ').addClass('waitlistspot').text('waitlist: ' + (spot !== null ? spot + ' / ' : '') + Models.room.data.waitList.length); $('#side-left .sidebar-content2').append(waitlistDiv); $('#side-left .sidebar-content2').append(' '); $(".meanlist").append( ' meh list:' + mehlist + ' ' + ' woot list:' + wootlist + ' ' ); } function checkMentioned() { if(timePassed >= timeToWait) { clearInterval(timer); mentioned = false; timePassed = 0; } else { timePassed = timePassed + 601; } } function checkClicked() { if (clickPassed >= clickWait) { clearInterval(clickTimer); clicked = false; clickPassed = 0; } else { clickPassed = clickPassed + 601; } } function checkSkipped() { if (skipPassed >= skipWait) { clearInterval(skipTimer); skipped = false; skipPassed = 600; } else { skipPassed = skipPassed + 500; } } $('#plugbot-css').remove(); $('#plugbot-js').remove(); $('#chat-messages').append(' Bem vindo auto-skip editado pelo Rafael Moraes 1.0 '); $('body').prepend('' + "\n" + styles.join("\n") + "\n" + ''); $('body').append(' ' + ' ||| ' + ' ' + ' ' + ' ' + ' ||| ' + ' ' + ' ' + ' '); $('body').append('');
opoplmm / Test1<html><head> <meta name="baidu-site-verification" content="1jPmULtLtZ"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=9"> <title>微信支付 - 中国领先的第三方支付平台 | 微信支付提供安全快捷的支付方式</title> <meta name="keywords" content="微信支付,微信,支付,移动支付,手机支付,微支付,微信支付开通,微信支付接入,微信支付申请,微信支付官网,微信支付商户平台,微信支付接口开发,微信支付接口申请,微信支付客服,微信支付登录"> <meta name="description" content="微信支付是腾讯公司的支付业务品牌,微信支付提供公众号支付、APP支付、扫码支付、刷卡支付等支付方式。微信支付结合微信公众账号,全面打通O2O生活消费领域,提供专业的互联网+行业解决方案,微信支付支持微信红包和微信理财通,是移动支付的首选。"> <link rel="shortcut icon" href="https://wx.gtimg.com/core/favicon.ico" type="image/x-icon"> <style> body,ol,ul,h1,h2,h3,h4,h5,h6,p{margin:0;padding:0;} body{min-width:1200px;font:14px "Helvetica Neue","Hiragino Sans GB","Microsoft YaHei","\9ED1\4F53",Arial,sans-serif;background:#fff;-webkit-text-size-adjust:100%;color:#222;} a{color:#459ae9;text-decoration:none;} a:hover{color:#459ae9;text-decoration:underline;} i,em{font-style:normal;} strong{font-weight:normal;} li{list-style:none;} img{border:0;vertical-align:middle;} table{border-collapse:collapse;border-spacing:0;} .hide{display:none;} .red{color:#ff0000;} .login-form label,.cbx,.guide-main-li-ico,.warn,.ico-new,.ico-right{background:url(https://wx.gtimg.com/pay/img/home/base.png?v=20160112) no-repeat;} .clr:after{content:".";clear:both;display:block;height:0;visibility:hidden;} .clr{zoom:1;} .hide{display:none;} .vs{margin:0 10px;font-family:arial;color:#ccc;} .cbx{width:16px;height:16px;display:inline-block;margin:-3px 6px 0 0;*margin-top:0;vertical-align:middle;cursor:pointer;overflow:hidden;} .cbx{background-position:0 -54px;} .cbx-on{background-position:0 -80px;display:inline-block;} .wrap{width:1025px;margin:0 auto;overflow:hidden;zoom:1;} .container{margin:25px auto;} .topbar{height:33px;line-height:33px;color:#999;background:#f6f6f6;border-bottom:1px solid #dcdcdc;font:12px/33px tahoma,arial,"Hiragino Sans GB",\5B8B\4F53,sans-serif;} .topbar a{color:#00c901;} .header{position:relative;z-index:99;background-color:#fff;/*border-top:4px solid #44b549;*/border-bottom:1px solid #d9dadc;} .header .wrap{height:60px;position:relative;overflow:visible;z-index:999} .header .logo{float:left;width:232px;overflow:hidden;} .header .logo a{display:block;height:40px;margin-top:12px;text-indent:-999px;background:url(https://wx.gtimg.com/pay/img/common/logo.png?v=20160114) no-repeat} .header .link{float:right;line-height:60px;} .header .link a{color:#222;} .header .link a:hover{color:#459ae9} .header .pole-msg{display:inline-block;*display:inline;position:relative;} .header .pole-msg a.content-us{display:inline-block;width:75px;height:60px;position:relative;z-index:9;} .header .pole-msg a.content-us:hover{color:#222;text-decoration:none;} .header .pole-msg.show-popup a.content-us{background:#fff;border-left:1px solid #e7e7eb;border-right:1px solid #e7e7eb;padding-left:16px;margin:0 -1px 0 -17px;*left:-17px;} .header .popup{display:none;position:absolute;top:59px;left:-97px;border:1px solid #e7e7eb;z-index:8;width:131px;} .header .show-popup .popup{display:block;line-height:26px;padding:14px 20px;background:#fff;} .header .show-popup .popup p{font-size:12px;color:#999} .header .show-popup .popup p.tel{color:#333333;font-size:17px;} .header .show-popup .popup .bor-top{border-top:1px solid #e7e7eb;margin-top:10px;padding-top:10px;} .header .dropdown-arrow{position:absolute;right:6px;top:29px;border-color:#c2c2c2 transparent transparent;border-style:solid dashed dashed;border-width:4px 4px 0;font-size:0;height:0;width:0;line-height:0;} .header .show-popup .dropdown-arrow{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:all .25s ease 0s;-moz-transition:all .25s ease 0s;-o-transition:all .25s ease 0s;transition:all .25s ease 0s;} .footer{text-align:center;padding-bottom:20px;color:#999999;font:12px/1.6 tahoma,arial,"Hiragino Sans GB",\5B8B\4F53,sans-serif;} .footer p{margin-bottom:8px;} .footer a{color:#999999;} .footer a:hover{color:#459ae9} .banner{height:410px;position:relative;} .banner .wrap-login{position:relative;z-index:2;} .banner .login{float:right;width:314px;margin-top:20px;padding:15px 15px 20px;background:rgba(255,255,255,0.8);position:static;border:1px solid #fff;} @media \0screen\,screen\9{ .banner .login{background:#fff;filter:alpha(opacity=80);*zoom:1;position:static;} .banner .login .login-in{position:relative;} } .banner .login h2{margin-bottom:5px;font-size:20px;font-weight:400;} .banner .login h2 strong{display:none;} .banner .login a{color:#333} .banner .login a:hover{color:#459ae9} .banner .login .tips-error a,.banner .login .tips-warn a{color:#459ae9} .banner .login .tips-error{line-height:24px;font-size:13px;} .banner .login .tips-warn .warn{float:left;width:16px;height:16px;background-position:-24px 0;margin-top:4px;} .banner .login .tips-warn p{float:right;color:#b29b4a;width:290px;font-size:13px;line-height:24px} .banner .login-form .login-mainly{margin-top:10px;margin-bottom:10px;} .banner .login-form .login-account,.banner .login-form .login-password{height:42px;line-height:42px;padding:3px 0;background:#fff;border-left:1px solid #cecece;border-top:1px solid #cecece;position:relative;padding-left:54px;} .banner .login-form label{width:20px;height:20px;overflow:hidden;text-indent:-999px;position:absolute;left:20px;top:30%} .banner .login-form input{width:100%;padding:11px 0;border:0;box-shadow:0;outline:0;vertical-align:middle;font-family:"Microsoft YaHei";font-size:14px;} .banner .login-form .ico-account{background-position:0 0;} .banner .login-form .ico-password{background-position:0 -26px;} .banner .login-form .login-password{margin-top:10px;} .banner .login-password-on .login-account{border-bottom:none;} .banner .login-verify{margin-bottom:10px;height:38px;} .banner .login-verify input{width:100px;padding:10px;vertical-align:middle;vertical-align:middle;border-left:1px solid #cecece;border-top:1px solid #cecece;} .banner .login-verify input:focus{border-left:1px solid #cecece;border-top:1px solid #cecece;} .banner .login-verify .img-verify{width:100px;height:40px;margin:0 11px;vertical-align:middle;} .banner .login-memory{margin-bottom:20px;overflow:hidden;zoom:1;} .banner .login-memory .memory-account{float:left;} .banner .login-memory .forget-password{float:right;} .banner .login .btn-login{display:inline-block;width:100%;height:45px;line-height:45px;background-color:#00c800;color:#fff;border:1px solid #44b549;text-align:center;font-size:20px;} .banner .login .btn-login:hover{text-decoration:none;background:#2F9833;color:#fff;} .guide-main-li-ico{display:inline-block;width:73px;height:57px;} .ico-mp{background-position:2px -159px;} .ico-app{background-position:8px -366px;} .ico-code{background-position:4px -230px;} .ico-shuaka{background-position:8px -294px;} /*最新公告*/ .cms-notice{margin:5px 0 -7px;position:relative;} .cms-notice h2,.cms-notice ul,.cms-notice p{display:inline-block;line-height:20px;} .cms-notice h2{float:left;background:#595B5B;color:#fff;font-size:14px;padding:0px 4px;} .cms-notice li{float:left;margin-left:18px;width:275px;} .cms-notice a{color:#222} .cms-notice a:hover{color:#459ae9} .cms-notice li span.time{float:left;color:#999;margin-right:5px;} .cms-notice li a{display:inline-block;max-width:205px;_width:205px;height:21px;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis;} .cms-notice p{float:right;} .cms-notice p a{color:#222;} .cms-notice li .ico-new{position:absolute;display:inline-block;width:17px;height:9px;margin-left:5px;background:url(https://wx.gtimg.com/mch/img/ico-new.png);} .cms-notice .more{position:absolute;top:0;right:0;} .cms-notice .more .ico-right{display:inline-block;width:11px;height:9px;margin:0 0 0 3px;vertical-align:middle;background-position:-4px -135px;} /*四大支付方式*/ .title{margin-top:45px;} .title h2,.title .line,.title .pay-btn{display:inline-block;} .title h2{font-size:20px;font-weight:normal;color:#333;background:#fff;position:absolute;margin-top:-15px;padding-right:10px;} .title .pay-btn{position:absolute;right:0;margin-top:-14px;background:#fff;padding-left:5px;} .title .pay-btn a{display:block;border:1px solid #3e3a39;padding:2px 5px 2px 17px;color:#333333;} .title .pay-btn a:hover{text-decoration:none} .through{height:326px;margin-top:20px;padding-bottom:35px;border-bottom:1px dotted #ccc;background:url(https://wx.gtimg.com/pay/img/home/qrcode.png?v=20150602) center top no-repeat;} .through li{font-size:16px;margin-top:58px;margin-left:68px;position:absolute;} .through li.l02{margin-top:143px;} .through li.l03{margin-top:228px;} .through li.l04{margin-left:748px;} .through li.l05{margin-top:143px;margin-left:755px;} .through li.l06{margin-top:228px;margin-left:755px;} .guide-main{margin-top:37px;margin-bottom:5px;} .guide-main li{width:240px;height:266px;background-color:#FFFFFF;float:left;margin-right:21px;_margin-right:20px;text-align:center} .guide-main .guide-main-li-4{margin-right:0;} .guide-main li a{width:239px;height:266px;display:block;position:relative;border:1px solid #e5e5e5;} .guide-main li .title{display:block;color:#000000;font-size:16px;line-height:1;margin-top:25px;font-weight:normal} .guide-main li .info{display:block;color:#999999;font-size:12px;line-height:1;margin-top:14px;} .guide-main li .info .strong{font-weight:bold;} .guide-main-li-ico{margin-top:72px;-webkit-transition:margin-top 0.2s linear;-moz-transition:margin-top 0.2s linear;-ms-transition:margin-top 0.2s linear;-o-transition:margin-top 0.2s linear;transition:margin-top 0.2s linear;} .guide-main li .btngreen{display:none;margin:20px auto 0;width:191px;height:35px;line-height:35px;background-color:#00C800;font-size:14px;color:#FFFFFF;border-bottom:1px solid #00A000;} .guide-main li .btngray{background-color:#E6E6E6!important;color:#666666!important;border-bottom:1px solid #CCCCCC;} .guide-main-li-3 .tips{display:none;font-size:12px;color:#FF9900;line-height:1;} .guide-main-li-3 .tips .ico-info-orange{vertical-align:-3px;*vertical-align:1px;margin-right:5px;margin-top:12px;} .guide-main li a:hover{border:1px solid #00c800;text-decoration:none} .guide-main li a:hover .btngreen{display:block;} .guide-main li a:hover .tips{display:block;} .guide-main li a:hover .guide-main-li-ico{margin-top:45px;-webkit-transition:margin-top 0.2s linear;-moz-transition:margin-top 0.2s linear;-ms-transition:margin-top 0.2s linear;-o-transition:margin-top 0.2s linear;transition:margin-top 0.2s linear;} .guide-link{padding-top:120px;padding-bottom:58px;position:relative;height:24px;} .guide-link-a{color:#00C800;font-size:18px;height:24px;width:162px;} .guide-link-a .ico-arrow-right{vertical-align:-2px;*vertical-align:3px;margin-left:8px;cursor:pointer;} .guide-link-code{display:none;position:absolute;border:1px solid #C9C9C9;padding:6px;background-color:#FFFFFF;width:105px;height:105px;top:67px;left:50%;margin-left:90px;} .show-code .guide-link-code{display:block;} .show-code .ico-arrow-right{-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1);} /*图片轮播*/ .cms-banner{position:absolute;top:0;width:100%;height:410px;overflow:hidden; left:0} .cms-banner a{display:block;width:100%;height:410px;text-indent:-9999px;} .cms-banner ul li{position:absolute;top:0;width:100%;height:410px;background-position:center;background-repeat:no-repeat;} .cms-banner ol{position:absolute;z-index:9;bottom:0px;display:table;left:50%;margin-left:-73px;padding:16px 16px 16px 0;} .cms-banner ol li{float:left;width:10px;height:10px;margin-left:16px;text-indent:-9999px;background:#fff;border-radius:5px;overflow:hidden;} .cms-banner ol li.active{background:#44B549;} </style> </head> <body class="index" onclick="pgvWatchClick();"> <!-- 头部[[ --> <!-- 头部 [[ --> <script>var _speedMark=Date.now()</script> <!--小于ie7 跳转到错误页面 --> <!--[if lt IE 7]> <script> window.location.href='https://pay.weixin.qq.com/public/error/browser_tips'; </script> <![endif]--> <div class="topbar"> <div class="wrap"> <span onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.CHINA_BUSINESS'});">境内业务</span> <i class="vs">|</i> <a onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.INTERNATIONAL_BUSINESS'});" href="https://pay.weixin.qq.com/index.php/public/wechatpay" target="_blank">International business</a> </div> </div> <div class="header"> <div class="wrap"> <div class="logo"><h1><a href="/index.php/core/account" title="微信支付商户平台">微信支付商户平台</a></h1></div> <div class="link"> <a href="https://pay.weixin.qq.com/partner/public/home" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.SERVICE_PROVIDER'});"><strong class="hide">微信支付</strong>服务商</a> <i class="vs">|</i> <a href="https://pay.weixin.qq.com/wxzf_guide/index.shtml" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.WXZF_GUIDE'});"><strong class="hide">微信支付</strong>接入指引</a> <i class="vs">|</i> <a href="https://pay.weixin.qq.com/wiki/doc/api/index.php" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.API_DOC'});"><strong class="hide">微信支付</strong>开发文档</a> <i class="vs">|</i> <div class="pole-msg showPopUpJS"> <a class="content-us" href="javascript:;" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.HELP_CENTER'});">帮助中心<span class="dropdown-arrow"></span></a> <div class="popup"> <div class="inner"> <ul> <li> <p class="tel">客服:95017</p> <p>周一到周五 09:00-18:00</p> </li> <li class="bor-top"> <a href="http://kf.qq.com/product/wechatpaymentmerchant.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.QQ_KEFU'});">自助服务专区</a> </li> </ul> </div> </div> </div> </div> </div> </div> <script src="https://wx.gtimg.com/third/jquery/jquery-1.7.min.js"></script> <script type="text/javascript">if(typeof $jqueryUi == "undefined"){document.write('<script type="text/javascript" src="https://wx.gtimg.com/third/jquery/jquery-ui.js"></script"+">');}</script><script type="text/javascript" src="https://wx.gtimg.com/third/jquery/jquery-ui.js"></script"+"> <script>window["MCH.common.time"]=[new Date()]</script> <script id="legos:22195" ver="22195:20140901:20160908155731" name="MCH.common" src="https://wx.gtimg.com/mch/js/ver/2014/09/mch.common.20140901.js?t=20160908155731" charset="utf-8"></script><div class="mask-layer hide" id="header-masker"></div><!--[if !IE]>|xGv00|c95d265e97fcc54b235954b5b4a712f5<![endif]--> <script>window["MCH.header.time"]=[new Date()]</script> <script id="legos:22118" ver="22118:20140422:20160620111341" name="MCH.header" src="https://wx.gtimg.com/mch/js/ver/2014/04/mch.header.20140422.js?t=20160620111341" charset="utf-8"></script><!--[if !IE]>|xGv00|da289bab2d090281ed2476547ba6b944<![endif]--> <!-- 头部 ]] --><!--[if !IE]>|xGv00|73bbdddabec4f094fcae10c51db0f883<![endif]--> <!-- 头部 ]] --> <!-- 登录[[ --> <div class="banner"> <div class="cms-banner cms-area" id="cmspic_1000" home="true"><ul><li style="opacity: 0; z-index: 0; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJutFViafoibhr5UHrDC2mbMGDZyLEY3icMbqS2o3BoicgX18HtuYicRR0fOJM/0");"><a target="_blank" href="https://pay.weixin.qq.com/public/qrcode_pay">banner</a></li><li style="opacity: 0.248188; z-index: 0; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJuvfQibNQiaWz5VUDocbQSYYe3hM60YBT0t6AWkzDjcIFFgQxckUUn64nQ/0");"><a target="_blank" href="http://v.qq.com/x/cover/mv3e2ecbtloy44o.html?vid=u01960zjo7r">banner</a></li><li style="opacity: 0.751812; z-index: 1; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJuv0wHAj5rxw34SXVgoycsicBB7zpopLBoGzl6S7EicZPsOPsyfj90NG2I/0");"><a target="_blank" href="http://v.qq.com/x/cover/mv3e2ecbtloy44o.html?vid=u01960zjo7r">banner</a></li><li style="opacity: 0; z-index: 0; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJuupH9MJ5hbqw5sMmlyyn0UnUicF2UeHLKEkCO11MnS1DoXXicX3gOwfuK/0");"><a target="_blank" href="http://v.qq.com/x/cover/mv3e2ecbtloy44o.html?vid=u01960zjo7r">banner</a></li><li style="opacity: 0; z-index: 0; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJuuZ81jvVm2RMN2C3hBE2oKW6UjJKs99mAZRxGOdCFYkyMU8NxHLDlLQ/0");"><a target="_blank" href="http://v.qq.com/x/cover/mv3e2ecbtloy44o.html?vid=u01960zjo7r">banner</a></li></ul><ol class="dots" style="opacity: 1; z-index: 1;"><li class="dot">1</li><li class="dot">2</li><li class="dot active">3</li><li class="dot">4</li><li class="dot">5</li></ol></div> <div class="wrap"> <div class="wrap-login"> <div class="login"> <div class="login-in"> <h2><span class="hide">微信支付</span>商户登录</h2> <div class="tips-warn clr hide" id="IDBrowserSafariTips"><i class="warn"></i><p>由于Safari浏览器安全策略,如密码输入出现异常,请根据指引修改Safari浏览器配置, <a href="/help_guide/login_guide.shtml" target="_blank">查看指引</a></p></div> <div class="tips-warn clr hide" id="IDBrowserMacChromeTips"><i class="warn"></i><p> 如密码输入出现异常,请根据指引修改浏览器配置, <a href="https://pay.weixin.qq.com/index.php/public/cms/content_detail?platformType=0&lang=zh&id=29000 " target="_blank">查看指引。</a></p></div> <div class="tips-error"><i class="ico-error"></i><p id="errmsg" style="color:red"></p></div> <!-- 交互说明 1. 给样式"login-form"添加样式"login-account-on",显示账号获焦效果 2. 给样式"login-form"添加样式"login-password-on",显示密码获焦效果 --> <form class="login-form login-password-on" action="/index.php/core/home/d_login_transition" method="post"> <div class="login-mainly"> <div class="login-account"><label class="ico-account" for="" title="登录帐号">登录帐号</label><input type="text" name="username" placeholder="登录帐号" id="idUserName"></div> <div class="login-password" id="mmpayPwdEdit"><label class="ico-password" for="" title="登录密码">登录密码</label><input type="password" name="password" placeholder="登录密码" id="idPassword"></div> </div> <input type="hidden" name="return_url" value="/index.php"> <input type="hidden" name="login_type" value="0"> <input id="token" type="hidden" name="ecc_csrf_token" value="2a9b085516b87f66cb0ca18a5453bdf4"> <div class="login-verify "><input type="text" name="checkword_in" maxlength="4" placeholder="验证码"><input type="hidden" name="need_check" value="1"><img class="img-verify change-verify" src="http://captcha.qq.com/getimage?aid=755049101&rd=0.1314846018794924" style="height:40px;width:100px;"><a class="change-verify" href="#">换一张</a></div> </form> <div class="login-memory"><label id="memory_username_label" class="memory-account" for=""><i class="cbx" id="memory_username"></i>记住帐号</label><a class="forget-password" href="/index.php/public/reset_pass" onclick="pgvSendClick({hottag:'PAY.HOME.LOGIN_BOX.FORGET_PASSWORD'});">忘记密码?</a></div> <a class="btn-login" href="javascript:void(0);" id="do_login" onclick="pgvSendClick({hottag:'PAY.HOME.LOGIN_BOX.LOGIN_BUTTON'});">登录</a> </div> </div> <input id="seed" type="hidden" name="time_seed" value="31343839353931393137"> </div> </div> </div> <!-- 登录 ]] --> <!-- 内容[[ --> <div class="container"> <div class="wrap"> <!-- 最新公告[[ --> <div class="cms-notice cms-area clr" id="cmsanm_6000" home="true" link-list-id="6200"><h2>最新公告</h2><ul><li><span class="time">[03.15]</span><a target="_blank" href="/index.php/public/cms/content_detail?lang=zh&id=36602" title="3月16-17日微信支付退款业务升级维护通知">3月16-17日微信支付退款业务升级维护通知</a><i class="ico-new"></i></li><li><span class="time">[02.10]</span><a target="_blank" href="/index.php/public/cms/content_detail?lang=zh&id=41201" title="微信支付企业付款业务调整公告">微信支付企业付款业务调整公告</a></li><li><span class="time">[11.30]</span><a target="_blank" href="/index.php/public/cms/content_detail?lang=zh&id=30001" title="《商户平台使用手册》正式上线">《商户平台使用手册》正式上线</a></li></ul><p class="more"><a href="/public/cms/content_list?lang=zh&id=6200" target="_blank">更多公告>></a></p></div> <!-- 最新公告 ]] --> <!-- 四大支付方式[[ --> <div class="title clr"> <h2>接入微信支付</h2> </div> <div class="function clr"> <ul class="guide-main clr"> <li class="guide-main-li-1"> <a href="http://kf.qq.com/faq/120911VrYVrA150905zeYjMZ.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.APPLY.IN_APP_WEB'});"> <span class="guide-main-li-ico ico-mp"></span> <h3 class="title">公众号支付</h3> <p class="info">在微信内的商家页面上完成<em>公众号支付</em></p> <span class="btngreen">我要接入</span> </a> </li> <li class="guide-main-li-2"> <a href="http://kf.qq.com/faq/120911VrYVrA150906F3qqY3.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.APPLY.IN_APP'});"> <span class="guide-main-li-ico ico-app"></span> <h3 class="title">APP支付</h3> <p class="info">在APP中,调起微信进行<em>APP支付</em></p> <span class="btngreen">我要接入</span> </a> </li> <li class="guide-main-li-3"> <a href="http://kf.qq.com/faq/120911VrYVrA150906yUZze6.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.APPLY.QR_CODE'});"> <span class="guide-main-li-ico ico-code"></span> <h3 class="title">扫码支付</h3> <p class="info">扫描二维码进行<em>扫码支付</em></p> <span class="btngreen">我要接入</span> </a> </li> <li class="guide-main-li-4"> <a href="http://kf.qq.com/faq/120911VrYVrA150906iQjQjI.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.APPLY.QUICK_PAY'});"> <span class="guide-main-li-ico ico-shuaka"></span> <h3 class="title">刷卡支付</h3> <p class="info">用户展示条码,商户扫描完成<em>刷卡支付</em></p> <span class="btngreen">我要接入</span> </a> </li> </ul> </div> <!-- 四大支付方式 ]] --> <!-- 微信支付商户通[[ --> <div class="title clr"> <h2>微信支付商户通</h2> </div> <div class="through"> <ul> <li class="l01">如何快速接入<strong>微信支付</strong>?</li> <li class="l02">了解最新的<strong>支付技术接口</strong>?</li> <li class="l03"><strong>微信商户</strong>后台操作有疑问?</li> <li class="l04"><strong>微信现金红包</strong>怎么玩?</li> <li class="l05">掌握最新的<strong>微信行业解决方案</strong>?</li> <li class="l06">获取一手的<strong>微信支付官方动态</strong>?</li> </ul> </div> <!-- 微信支付商户通 ]] --> </div> </div> <!-- 内容 ]] --> <script src="https://www.tenpay.com/v2/res/js/global/tenpayctrl_v2-min.js"></script> <script>window["MCH.tenpaycertV2.time"]=[new Date()]</script> <script id="legos:22410" ver="22410:20151023:20170106102318" name="MCH.tenpaycertV2" src="https://wx.gtimg.com/mch/js/ver/2015/10/mch.tenpaycertV2.20151023.js?t=20170106102318" charset="utf-8"></script><!--[if !IE]>|xGv00|09219d01d9d2312179afd1ffbb55230b<![endif]--><!--[if !IE]>|xGv00|8ab59df4495293a71573934cfa4d640c<![endif]--> <script>window["MCH.home.time"]=[new Date()]</script> <script id="legos:22134" ver="22134:20140516:20170105201629" name="MCH.home" charset="utf-8"> window['MCH.home.time'] && window['MCH.home.time'].push(new Date()); function $addToken(url,type,skey){var token=$getToken(skey);if(url==""||(url.indexOf("://")<0?location.href:url).indexOf("http")!=0){return url;} if(url.indexOf("#")!=-1){var f1=url.match(/\?.+\#/);if(f1){var t=f1[0].split("#"),newPara=[t[0],"&g_tk=",token,"&g_ty=",type,"#",t[1]].join("");return url.replace(f1[0],newPara);}else{var t=url.split("#");return[t[0],"?g_tk=",token,"&g_ty=",type,"#",t[1]].join("");}} return token==""?(url+(url.indexOf("?")!=-1?"&":"?")+"g_ty="+type):(url+(url.indexOf("?")!=-1?"&":"?")+"g_tk="+token+"&g_ty="+type);};var $ajax=(function(window,undefined){var oXHRCallbacks,xhrCounter=0;var fXHRAbortOnUnload=window.ActiveXObject?function(){for(var key in oXHRCallbacks){oXHRCallbacks[key](0,1);}}:false;return function(opt){var o={url:'',method:'GET',data:null,type:"text",async:true,cache:false,timeout:0,autoToken:true,username:'',password:'',beforeSend:$empty(),onSuccess:$empty(),onError:$empty(),onComplete:$empty()};for(var key in opt){o[key]=opt[key]} var callback,timeoutTimer,xhrCallbackHandle,ajaxLocation,ajaxLocParts;try{ajaxLocation=location.href;} catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;} ajaxLocParts=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/.exec(ajaxLocation.toLowerCase())||[];o.isLocal=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ajaxLocParts[1]);o.method=(typeof(o.method)!="string"||o.method.toUpperCase()!="POST")?"GET":"POST";o.data=(typeof o.data=="string")?o.data:$makeUrl(o.data);if(o.method=='GET'&&o.data){o.url+=(o.url.indexOf("?")<0?"?":"&")+o.data;} if(o.autoToken){o.url=$addToken(o.url,"ajax");} o.xhr=$xhrMaker();if(o.xhr===null){return false;} try{if(o.username){o.xhr.open(o.method,o.url,o.async,o.username,o.password);} else{o.xhr.open(o.method,o.url,o.async);}} catch(e){o.onError(-2,e);return false;} if(o.method=='POST'){o.xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');} if(!o.cache){o.xhr.setRequestHeader('If-Modified-Since','Thu, 1 Jan 1970 00:00:00 GMT');o.xhr.setRequestHeader('Cache-Control','no-cache');} o.beforeSend(o.xhr);if(o.async&&o.timeout>0){if(o.xhr.timeout===undefined){timeoutTimer=setTimeout(function(){if(o.xhr&&callback){callback(0,1);} o.onError(0,null,'timeout');},o.timeout);} else{o.xhr.timeout=o.timeout;o.xhr.ontimeout=function(){if(o.xhr&&callback){callback(0,1);} o.onError(0,null,'timeout');};}} o.xhr.send(o.method=='POST'?o.data:null);callback=function(e,isAbort){if(timeoutTimer){clearTimeout(timeoutTimer);timeoutTimer=undefined;} if(callback&&(isAbort||o.xhr.readyState===4)){callback=undefined;if(xhrCallbackHandle){o.xhr.onreadystatechange=$empty();if(fXHRAbortOnUnload){try{delete oXHRCallbacks[xhrCallbackHandle];} catch(e){}}} if(isAbort){if(o.xhr.readyState!==4){o.xhr.abort();}} else{var status,statusText,responses;responses={headers:o.xhr.getAllResponseHeaders()};status=o.xhr.status;try{statusText=o.xhr.statusText;} catch(e){statusText="";} try{responses.text=o.xhr.responseText;} catch(e){responses.text="";} if(!status&&o.isLocal){status=responses.text?200:404;} else if(status===1223){status=204;} if(status>=200&&status<300){responses.text=responses.text.replace(/<!--\[if !IE\]>[\w\|]+<!\[endif\]-->/g,'');switch(o.type){case'text':o.onSuccess(responses.text);break;case"json":var json;try{json=(new Function("return ("+responses.text+")"))();} catch(e){o.onError(status,e,responses.text);} if(json){o.onSuccess(json);} break;case"xml":o.onSuccess(o.xhr.responseXML);break;}} else{if(status===0&&o.timeout>0){o.onError(status,null,'timeout');} else{o.onError(status,null,statusText);}} o.onComplete(status,statusText,responses);} delete o.xhr;}};if(!o.async){callback();} else if(o.xhr.readyState===4){setTimeout(callback,0);} else{xhrCallbackHandle=++xhrCounter;if(fXHRAbortOnUnload){if(!oXHRCallbacks){oXHRCallbacks={};if(window.attachEvent){window.attachEvent("onunload",fXHRAbortOnUnload);} else{window["onunload"]=fXHRAbortOnUnload;}} oXHRCallbacks[xhrCallbackHandle]=callback;} o.xhr.onreadystatechange=callback;}};})(window,undefined);function $empty(){return function(){return true;}};function $getCookie(name){var reg=new RegExp("(^| )"+name+"(?:=([^;]*))?(;|$)"),val=document.cookie.match(reg);return val?(val[2]?unescape(val[2]):""):null;};function $getToken(skey){var skey=skey?skey:$getCookie("skey");return skey?$time33(skey):"";};function $makeUrl(data){var arr=[];for(var k in data){arr.push(k+"="+data[k]);};return arr.join("&");};function $namespace(name){for(var arr=name.split(','),r=0,len=arr.length;r<len;r++){for(var i=0,k,name=arr[r].split('.'),parent={};k=name[i];i++){i===0?eval('(typeof '+k+')==="undefined"?('+k+'={}):"";parent='+k):(parent=parent[k]=parent[k]||{});}}};function $setCookie(name,value,expires,path,domain,secure){var exp=new Date(),expires=arguments[2]||null,path=arguments[3]||"/",domain=arguments[4]||null,secure=arguments[5]||false;expires?exp.setMinutes(exp.getMinutes()+parseInt(expires)):"";document.cookie=name+'='+escape(value)+(expires?';expires='+exp.toGMTString():'')+(path?';path='+path:'')+(domain?';domain='+domain:'')+(secure?';secure':'');};function $strTrim(str,code){var argus=code||"\\s";var temp=new RegExp("(^"+argus+"*)|("+argus+"*$)","g");return str.replace(temp,"");};function $time33(str){for(var i=0,len=str.length,hash=5381;i<len;++i){hash+=(hash<<5)+str.charAt(i).charCodeAt();};return hash&0x7fffffff;};function $xhrMaker(){var xhr;try{xhr=new XMLHttpRequest();}catch(e){try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){xhr=null;}}};return xhr;};$namespace("MCH.home");MCH.home={tenpayEdit:''};MCH.home.init=function(){homeThat=this;homeThat.tenpayEdit=new MCH.mmpayEdit({bindObjId:"mmpayPwdEdit",width:258,height:44},{isShowFunc:MCH.home.isShowFunc,returnCallBack:MCH.home.editShowReturn},this);this.bind();Common.exdAttrBrowser();};MCH.home.isShowFunc=function(){var username=$strTrim($(".login-form").find("input[name=username]").val());if(Common.isTenpayMchByName(username)){return true;}else{return false;}};MCH.home.editShowReturn=function(editRet){var browserFunc=function(){var sys=Common.getBrowserVersion();if(sys.osType=="mac"&&sys.browserName=="Safari"){$("#IDBrowserSafariTips").removeClass("hide");}else if(sys.osType=="mac"&&sys.browserName=="Chrome"&&sys.browserVersion>="47"){$("#IDBrowserMacChromeTips").removeClass("hide");}else if(sys.osType=="windows"&&sys.browserName!="IE"){$("#IDBrowserMacChromeTips").removeClass("hide");}};try{var version=editRet.editObj.ctrl.Version.toString();if(version&&(version>1206)){return true;}else{browserFunc();}}catch(e){browserFunc();}};MCH.home.focus_fuc=function(){$(".login-form").removeClass("login-account-on");$(".login-form").addClass("login-password-on");};MCH.home.blur_fuc=function(){$(".login-form").removeClass("login-password-on");};MCH.home.enter_fuc=function(){return null;};MCH.home.ossAttrIncAPI=function(id,key){var postData='id='+id+'&key='+key;$ajax({url:'/webreport/ossattrapi',data:postData,method:'post',type:'json',async:true,onSuccess:function(data){},onError:function(msg){}});};MCH.home.userNameBlur=function(){var username=$(".login-form").find("input[name=username]").val();var length=username.length;switch(length){case 0:MCH.home.ossAttrIncAPI(63769,18);break;case 1:MCH.home.ossAttrIncAPI(63769,19);break;case 2:MCH.home.ossAttrIncAPI(63769,20);break;case 3:MCH.home.ossAttrIncAPI(63769,21);break;case 4:MCH.home.ossAttrIncAPI(63769,22);break;case 5:MCH.home.ossAttrIncAPI(63769,23);break;case 6:MCH.home.ossAttrIncAPI(63769,24);break;case 7:MCH.home.ossAttrIncAPI(63769,25);break;case 8:MCH.home.ossAttrIncAPI(63769,26);break;case 9:MCH.home.ossAttrIncAPI(63769,27);break;case 10:MCH.home.ossAttrIncAPI(63769,28);break;default:MCH.home.ossAttrIncAPI(63769,29);break;} var ua=navigator.userAgent.toLowerCase();var reg=/[Aa]ndroid/;if(reg.test(ua)){MCH.home.ossAttrIncAPI(63769,31);}else{MCH.home.ossAttrIncAPI(63769,32);}};MCH.home.bind=function(){$("input[name=username]").focus();if($getCookie("username")){MCH.home.ossAttrIncAPI(63769,30);$("input[name=username]").val($getCookie("username"));$("#memory_username").addClass('cbx-on');} $("input[name=username]").on('focus',function(){MCH.home.ossAttrIncAPI(63769,17);$(".login-form").removeClass("login-password-on");$(".login-form").addClass("login-account-on");});$("input[name=password]").on('focus',function(){$(".login-form").removeClass("login-account-on");$(".login-form").addClass("login-password-on");homeThat.tenpayEdit.show();});$("input[name=username]").on('blur',function(){MCH.home.userNameBlur();$(".login-form").removeClass("login-account-on");$(".login-form").addClass("login-password-on");homeThat.tenpayEdit.show();});$("#memory_username_label").on('click',function(){if($('#memory_username').hasClass('cbx-on')){$('#memory_username').removeClass('cbx-on');}else{$('#memory_username').addClass('cbx-on');}});$("#do_login").on('click',function(){$("#errmsg").text("").addClass('hide');var temp_usrname=$(".login-form").find("input[name=username]").val();$(".login-form").find("input[name=username]").val($strTrim(temp_usrname));if($("#memory_username").hasClass('cbx-on')){$setCookie('username',$("input[name=username]").val(),'3600');}else{$setCookie('username',$("input[name=username]").val());} var username=$(".login-form").find("input[name=username]").val();var password=$(".login-form").find("input[name=password]").val();password=homeThat.tenpayEdit.getPwd();if(username&&password){password=Common.encryptPassword(password);if($(".login-verify").html()){if($("input[name=checkword_in]").val()){if($("input[name=checkword_in]").val().length!=4){$("#errmsg").text('请检查验证码').removeClass('hide');}else{$(".login-form").find("input[name=password]").val(password);$(".login-form").submit();}} else{$("#errmsg").text('请输入验证码').removeClass('hide');}}else{$(".login-form").find("input[name=password]").val(password);$(".login-form").submit();}}else{if(username.length==0&&password===false){$("#errmsg").text('请输入帐号和密码').removeClass('hide');}else if(username.length==0){$("#errmsg").text('请输入登录帐号').removeClass('hide');}else{$("#errmsg").text(homeThat.tenpayEdit.errmsg).removeClass('hide');}}});};MCH.home.init(); window['MCH.home']='22134:20140516:20170105201629'; window['MCH.home.time'] && window['MCH.home.time'].push(new Date()); </script><!--[if !IE]>|xGv00|6f5e5c77fe153f6e42ad173204c021c5<![endif]--> <script>window["MCH.cms.time"]=[new Date()]</script> <script id="legos:22392" ver="22392:20151027:20160810123858" name="MCH.cms" src="https://wx.gtimg.com/mch/js/ver/2015/10/mch.cms.20151027.js?t=20160810123858" charset="utf-8"></script><!--[if !IE]>|xGv00|b299de016a6e1f795625ccbc51c6c029<![endif]--> <!-- 底部[[ --> <div class="footer"> <div class="wrap"> <p> <a target="_blank" href="http://help.tenpay.com/cgi-bin/helpcenter/help_center.cgi?id=1&type=0">关于财付通</a> <i class="vs">|</i> <a target="_blank" href="https://pay.weixin.qq.com/index.php/core/home/pay_pact_v4">平台使用协议</a> <i class="vs">|</i> <a href="https://pay.weixin.qq.com/index.php/public/apply_sign/protocol_v2" target="_blank">支付服务协议</a> <i class="vs">|</i> Powered By Tencent & Tenpay Copyright© 2005-<script> var year=""; mydate=new Date(); myyear=mydate.getYear(); year=(myyear > 200) ? myyear : 1900 + myyear; document.write(year); </script>2017 Tenpay All Rights Reserved. </p> <p> <a target="_blank" href="http://weixin.qq.com/">微信</a> <i class="vs">|</i> <a target="_blank" href="https://mp.weixin.qq.com/">微信公众平台</a> <i class="vs">|</i> <a target="_blank" href="https://open.weixin.qq.com/">微信开放平台</a> <i class="vs">|</i> <a target="_blank" href="http://e.qq.com/">广点通</a> <i class="vs">|</i> <a target="_blank" href="http://open.qq.com/">腾讯开放平台</a> </p> </div> </div> <script type="text/javascript">if(typeof $jqueryUi == "undefined"){document.write('<script type="text/javascript" src="https://wx.gtimg.com/third/jquery/jquery-ui.js"></script"+">');}</script><script type="text/javascript" src="https://wx.gtimg.com/third/jquery/jquery-ui.js"></script"+"> <script>window["MCH.footer.time"]=[new Date()]</script> <script id="legos:22125" ver="22125:20140422:20161206161027" name="MCH.footer" charset="utf-8"> window['MCH.footer.time'] && window['MCH.footer.time'].push(new Date()); function $addToken(url,type,skey){var token=$getToken(skey);if(url==""||(url.indexOf("://")<0?location.href:url).indexOf("http")!=0){return url;} if(url.indexOf("#")!=-1){var f1=url.match(/\?.+\#/);if(f1){var t=f1[0].split("#"),newPara=[t[0],"&g_tk=",token,"&g_ty=",type,"#",t[1]].join("");return url.replace(f1[0],newPara);}else{var t=url.split("#");return[t[0],"?g_tk=",token,"&g_ty=",type,"#",t[1]].join("");}} return token==""?(url+(url.indexOf("?")!=-1?"&":"?")+"g_ty="+type):(url+(url.indexOf("?")!=-1?"&":"?")+"g_tk="+token+"&g_ty="+type);};var $ajax=(function(window,undefined){var oXHRCallbacks,xhrCounter=0;var fXHRAbortOnUnload=window.ActiveXObject?function(){for(var key in oXHRCallbacks){oXHRCallbacks[key](0,1);}}:false;return function(opt){var o={url:'',method:'GET',data:null,type:"text",async:true,cache:false,timeout:0,autoToken:true,username:'',password:'',beforeSend:$empty(),onSuccess:$empty(),onError:$empty(),onComplete:$empty()};for(var key in opt){o[key]=opt[key]} var callback,timeoutTimer,xhrCallbackHandle,ajaxLocation,ajaxLocParts;try{ajaxLocation=location.href;} catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;} ajaxLocParts=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/.exec(ajaxLocation.toLowerCase())||[];o.isLocal=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ajaxLocParts[1]);o.method=(typeof(o.method)!="string"||o.method.toUpperCase()!="POST")?"GET":"POST";o.data=(typeof o.data=="string")?o.data:$makeUrl(o.data);if(o.method=='GET'&&o.data){o.url+=(o.url.indexOf("?")<0?"?":"&")+o.data;} if(o.autoToken){o.url=$addToken(o.url,"ajax");} o.xhr=$xhrMaker();if(o.xhr===null){return false;} try{if(o.username){o.xhr.open(o.method,o.url,o.async,o.username,o.password);} else{o.xhr.open(o.method,o.url,o.async);}} catch(e){o.onError(-2,e);return false;} if(o.method=='POST'){o.xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');} if(!o.cache){o.xhr.setRequestHeader('If-Modified-Since','Thu, 1 Jan 1970 00:00:00 GMT');o.xhr.setRequestHeader('Cache-Control','no-cache');} o.beforeSend(o.xhr);if(o.async&&o.timeout>0){if(o.xhr.timeout===undefined){timeoutTimer=setTimeout(function(){if(o.xhr&&callback){callback(0,1);} o.onError(0,null,'timeout');},o.timeout);} else{o.xhr.timeout=o.timeout;o.xhr.ontimeout=function(){if(o.xhr&&callback){callback(0,1);} o.onError(0,null,'timeout');};}} o.xhr.send(o.method=='POST'?o.data:null);callback=function(e,isAbort){if(timeoutTimer){clearTimeout(timeoutTimer);timeoutTimer=undefined;} if(callback&&(isAbort||o.xhr.readyState===4)){callback=undefined;if(xhrCallbackHandle){o.xhr.onreadystatechange=$empty();if(fXHRAbortOnUnload){try{delete oXHRCallbacks[xhrCallbackHandle];} catch(e){}}} if(isAbort){if(o.xhr.readyState!==4){o.xhr.abort();}} else{var status,statusText,responses;responses={headers:o.xhr.getAllResponseHeaders()};status=o.xhr.status;try{statusText=o.xhr.statusText;} catch(e){statusText="";} try{responses.text=o.xhr.responseText;} catch(e){responses.text="";} if(!status&&o.isLocal){status=responses.text?200:404;} else if(status===1223){status=204;} if(status>=200&&status<300){responses.text=responses.text.replace(/<!--\[if !IE\]>[\w\|]+<!\[endif\]-->/g,'');switch(o.type){case'text':o.onSuccess(responses.text);break;case"json":var json;try{json=(new Function("return ("+responses.text+")"))();} catch(e){o.onError(status,e,responses.text);} if(json){o.onSuccess(json);} break;case"xml":o.onSuccess(o.xhr.responseXML);break;}} else{if(status===0&&o.timeout>0){o.onError(status,null,'timeout');} else{o.onError(status,null,statusText);}} o.onComplete(status,statusText,responses);} delete o.xhr;}};if(!o.async){callback();} else if(o.xhr.readyState===4){setTimeout(callback,0);} else{xhrCallbackHandle=++xhrCounter;if(fXHRAbortOnUnload){if(!oXHRCallbacks){oXHRCallbacks={};if(window.attachEvent){window.attachEvent("onunload",fXHRAbortOnUnload);} else{window["onunload"]=fXHRAbortOnUnload;}} oXHRCallbacks[xhrCallbackHandle]=callback;} o.xhr.onreadystatechange=callback;}};})(window,undefined);function $empty(){return function(){return true;}};function $getCookie(name){var reg=new RegExp("(^| )"+name+"(?:=([^;]*))?(;|$)"),val=document.cookie.match(reg);return val?(val[2]?unescape(val[2]):""):null;};function $getToken(skey){var skey=skey?skey:$getCookie("skey");return skey?$time33(skey):"";};function $makeUrl(data){var arr=[];for(var k in data){arr.push(k+"="+data[k]);};return arr.join("&");};function $namespace(name){for(var arr=name.split(','),r=0,len=arr.length;r<len;r++){for(var i=0,k,name=arr[r].split('.'),parent={};k=name[i];i++){i===0?eval('(typeof '+k+')==="undefined"?('+k+'={}):"";parent='+k):(parent=parent[k]=parent[k]||{});}}};function $time33(str){for(var i=0,len=str.length,hash=5381;i<len;++i){hash+=(hash<<5)+str.charAt(i).charCodeAt();};return hash&0x7fffffff;};function $xhrMaker(){var xhr;try{xhr=new XMLHttpRequest();}catch(e){try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){xhr=null;}}};return xhr;};$namespace("MCH.footer");MCH.footer={searchChildMerchantTimer:'',searchChildMerchantName:'',protocolDG:'',protocolCbx:'',protocolBtn:''};MCH.footer.init=function(){footerThat=this;footerThat.bind();footerThat.changeVerify();MCH.footer.protocolDG=Common.getPop('MchProtocolDG');MCH.footer.protocolBtn=$('#MchProtocolBn');MCH.footer.protocolCbx=Common.getCbx({id:'MchProtocolCbx',onCheck:function(){MCH.footer.protocolBtn.removeClass('btn-default').addClass('btn-primary');},onUnCheck:function(){MCH.footer.protocolBtn.removeClass('btn-primary').addClass('btn-default');}});MCH.footer.checkSignProtocol();};MCH.footer.bind=function(){footerThat.bindChangeCheckimg();footerThat.bindDatepicker();MCH.header.bindCloseDialog();footerThat.bindSelect();$('#MchProtocolBn').on('click',function(){if(MCH.footer.protocolCbx.isCheck()){var postData=Common.getCrsfToken();var ret=false;$ajax({url:'/index.php/core/merchant/sign_mch_protocol',data:postData,method:'post',type:'json',async:false,onSuccess:function(data){MCH.header.handleAjax(data);if(data.errorcode!=0){ret=false;}else{ret=true;}},onError:function(msg){ret=false;}});if(!ret){MCH.header.showErrorAlertDialog('操作失败,请稍后重试');}else{MCH.footer.protocolDG.close();}}});};MCH.footer.changeVerify=function(){if($(".img-verify").size()>0){$(".img-verify").attr("src","http://captcha.qq.com/getimage?aid=755049101&rd="+Math.random());}};MCH.footer.bindChangeCheckimg=function(){$(".change-verify").on('click',function(){footerThat.changeVerify();});$(".checkimg-input").on('keydown',function(){var value=$(this).val();result=false;if(value.length==4){var token_name=$("#token").attr("name");var hash=$("#token").val();var post_data=token_name+'='+hash+'&verify_word='+value;$ajax({url:'/index.php/core/home/vaild_checkimg',data:post_data,method:'post',type:'json',async:false,onSuccess:function(data){if(data.errorcode==0){result=true;}else{}},onError:function(msg){result=false;}});}});};MCH.footer.bindDatepicker=function(timepicker){if($(".datepicker-input").size()<=0){return false;} false?$jqueryUi():'';timepicker=timepicker?true:false;var format='Y-m-d';if(timepicker){format='Y-m-d H:i';} $('.datepicker-input').datetimepicker({defaultTime:'00:00:00',step:1,format:format,lang:'ch',timepicker:timepicker,yearStart:1970,closeOnDateSelect:true});$("input.datepicker-input").next("i.ico-date").on('click',function(){$(this).prev('input.datepicker-input').focus();});};MCH.footer.bindSelect=function(){$("div.dropdown-menu").on('click',function(){$(this).addClass('open');});$("ul.dropdown-list").on('click','li',function(){var value=$(this).children("a").attr('data-target');var text=$(this).children("a").text();var drop_switch=$(this).parent().prev("a.dropdown-switch");drop_switch.attr('data-target',value);drop_switch.children('label').text(text);var id=drop_switch.children('label').attr('id');var name=drop_switch.children('label').html();$(this).parent().parent().removeClass('open');typeof SelectCallBack=='function'&&SelectCallBack(id,name);return false;});$("div.dropdown-menu").mouseleave(function(){if($(this).hasClass('open')){$(this).removeClass('open');}});};MCH.footer.searchChildMerchant=function(params){var obj=params['obj'];var value=obj.val();if(value!=MCH.footer.searchChildMerchantName){return false;} var merchants={};var curpage=params['curpage'];var total_page=1;var isAppend=params['isAppend'];var list=obj.parent().parent().children('ul.dropdown-list');if(!isAppend){list.children().remove();} var token_name=$("#token").attr("name");var hash=$("#token").val();var post_data=token_name+'='+hash+'&merchant_name='+value+'&page_num='+curpage;$ajax({url:'/index.php/extend/child_merchant/query_merchant_by_name',data:post_data,method:'post',type:'json',async:true,onSuccess:function(data){if(data.errorcode==0){merchants=data.data.list;curpage=data.data.curpage;total_page=data.data.total_page;for(var key in merchants){var model='<li><a href="#" data-target="'+key+'">'+merchants[key]+'</a></li>';list.append(model);} if(curpage<total_page){var nextPage=parseInt(curpage,10)+1;var model='<dl class="jsDropDownLiMerchantMore"><a href="#" data-target="'+nextPage+'">获取更多子商户</a></dl>';list.append(model);}}},onError:function(msg){}});};MCH.footer.checkSignProtocol=function(){var whiteUrl=['/index.php/core/home','/index.php/core/apply_progress','/index.php/core/apply_bank','/index.php/core/apply_sign','/index.php/core/merchantupgrading','/index.php/core/submerchant/create_sub_merchant','/index.php/public/cms'];var localtion=window.location.pathname;prefix='/index.php';if(localtion.substr(0,prefix.length)!=prefix){localtion=prefix+localtion;} for(var i=0;i<whiteUrl.length;i++){if(localtion.substr(0,whiteUrl[i].length)==whiteUrl[i]){return;}} var postData=Common.getCrsfToken();$ajax({url:'/index.php/public/merchant/check_sign_protocol',data:postData,method:'post',type:'json',async:true,onSuccess:function(data){MCH.header.handleAjax(data);if(data.errorcode!=0){MCH.footer.protocolDG.open();}},onError:function(msg){}});};MCH.footer.init(); window['MCH.footer']='22125:20140422:20161206161027'; window['MCH.footer.time'] && window['MCH.footer.time'].push(new Date()); </script><!--[if !IE]>|xGv00|f223e6d2e6d5217ac8b233a5d7602c18<![endif]--> <script>TA_STATS_ARGS={}</script> <script type="text/javascript" src="https://tajs.qq.com/res/js/wechatpay.min.js" charset="UTF−8"></script> <!-- <script type="text/javascript" src="https://res.wx.qq.com/payactres/zh_CN/htmledition/js/lib/analysis/2.0/lib-min.js" charset="UTF−8" async="async" defer="defer"></script> --> <!--[if !IE]>|xGv00|f5ede3a717a9f61ace3f2ab9101502d0<![endif]--> <!-- 底部 ]] --> <script language="javascript" src="https://pingjs.qq.com/tcss.ping.https.js"></script> <script language="javascript"> if(typeof(pgvMain) == 'function') pgvMain(); </script> <!--[if !IE]>|xGv00|d554775be84487e94ed910def6bb127d<![endif]--></body></html>
handsomematt / Ida Func PtrEasily create and copy function pointers to functions in IDA.
Stivius / Callable WrapperSimple header-only wrapper for converting std::bind result to function pointer
YAL-GameMaker / Function Get Address 2024A trick for getting pointers to built-in functions in GameMaker 2.3 / GM2022+
AronDerenyi / FuncA crate that helps creating colsures from function pointers
sunwookim05 / Object Oriented C LanguageObject-Oriented C Language is a pure C project that mimics object-oriented programming using structs and function pointers. Implements core OOP concepts in C (C99) using structs and function pointers, without external libraries.
vitorpy / Ziglana The ReturnSolana BPF programs using standard Zig compiler + sbpf-linker. Zero dependencies, direct syscalls via function pointers.
LeonHartley / Rapidhabbo emulator example written in swift using GCD for threading and synchronisation and an implementation of libuv written in C using function pointers to bridge code between the 2 modules. It currently supports MySQL and Redis for the database but it is written in a way so it's very easy to write in your own database implementation.
artemain / Sat= // @name MetaBot for YouTube // @namespace yt-metabot-user-js // @description More information about users and videos on YouTube. // @version 200322 // @homepageURL https://vk.com/public159378864 // @supportURL https://github.com/asrdri/yt-metabot-user-js/issues // @updateURL https://raw.githubusercontent.com/asrdri/yt-metabot-user-js/master/yt-metabot.meta.js // @downloadURL https://raw.githubusercontent.com/asrdri/yt-metabot-user-js/master/yt-metabot.user.js // @icon https://raw.githubusercontent.com/asrdri/yt-metabot-user-js/master/logo.png // @include https://*youtube.com/* // @include https://*dislikemeter.com/?v* // @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js // @require https://raw.githubusercontent.com/sizzlemctwizzle/GM_config/master/gm_config.js // @grant GM_getValue // @grant GM_setValue // @grant GM_xmlhttpRequest // @grant GM.xmlHttpRequest // @run-at document-start // ==/UserScript== GM_config.init( { 'id': 'ytmetabot_config', 'title': 'MetaBot/YT Settings', 'fields': { 'option1': { 'label': 'Processing mode for comments by known bots', 'type': 'int', 'min': 1, 'max': 2, 'default': 1 }, 'option2': { 'label': 'Auto-dislike comments by known bots', 'type': 'checkbox', 'default': false }, 'option3': { 'label': 'Hide long like/dislike/share button text', 'type': 'checkbox', 'default': true }, 'option4': { 'label': 'Use additional lists', 'type': 'checkbox', 'default': true }, 'option5': { 'label': 'Send alert to server', 'type': 'checkbox', 'default': false }, 'listp1': { 'label': 'Bookmarks (personal list)', 'type': 'text', 'default': '' }, 'listc1': { 'label': 'Custom list URL 1', 'type': 'text', 'default': 'https://github.com/asrdri/yt-metabot-user-js/raw/master/list-sample.txt' }, 'listc2': { 'label': 'Custom list URL 2', 'type': 'text', 'default': '' }, 'listc3': { 'label': 'Custom list URL 3', 'type': 'text', 'default': '' }, 'colorp1': { 'label': 'Personal color', 'type': 'int', 'default': '33023' }, 'colorc1': { 'label': 'Custom color 1', 'type': 'int', 'default': '8388863' }, 'colorc2': { 'label': 'Custom color 2', 'type': 'int', 'default': '16744448' }, 'colorc3': { 'label': 'Custom color 3', 'type': 'int', 'default': '8421504' } }, }); const checkb = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAPCAMAAADXs89aAAAA+VBMVEUAAAD///+qqqp/f39mZmZubm5vb29sbGxtbW1tbW1tbW1ubm5ubm5tbW1ubm5tbW1ubm5ubm5ubm5tbW1tbW1ubm5ubm5tbW1ubm5ubm5tbW1ubm5ubm5vb29wcHBxcXFzc3N0dHR1dXV3d3d4eHh6enp7e3t8fHyAgICCgoKFhYWMjIyOjo6Pj4+QkJCSkpKUlJSWlpaZmZmampqdnZ2hoaGqqqqwsLC0tLS1tbW2tra5ubm+vr7ExMTKysrLy8vQ0NDR0dHS0tLU1NTV1dXW1tbe3t7i4uLj4+Pk5OTl5eXn5+fo6Ojq6urs7Ozu7u7w8PD9/f3////SCMufAAAAHHRSTlMAAAMEBSUnKCpbXV9htre6u87Q0dPp6uvs7u/8pkhKVQAAAMdJREFUeNpN0NdWwlAUANEbgvTeQhnQIE1B1ChYQcEC0gL+/8ewzPWwmMf9OMowDKWUP5YqU0pGTaXTHMqdOcM7G7LBIw4Vnc3b89i9BytwYH+uv7oAOqsbyJjCMb4d/urOgYhwqr55wmvdhIRwufXT0zzrgCVM1X2tA5xva1ARLvE4aQCMXoCCcJLaZNpvX71/3QJx4ShUBx+Lz4fp7hrCwmYWL3v5u7XTPmEVtLRfuk7+5OhJIKP9NO2psDIjCatSiId9/7oHY28awgWqV+8AAAAASUVORK5CYII='; const minf = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAAM1BMVEUAAAB/f39vb29sbGxtbW1ubm5ubm5sbGxubm5ubm7////Pz8+Li4uampp8fHzb29uSkpKUSDd+AAAACXRSTlMABCcoXbfQ6/zS5clrAAAAYUlEQVQIHQXBAQLCMAgEsBxs+v/32oJJkE5lZ+8Suhu4Z7R6m2c/NVW28zbmew8xeV4A+FWgkjSkCuYDqAo4gNQCgK0BAFMLHsD2pqjL1rqnSSysOdt2U8C9I0insrN3+QOBPC04AhR0BwAAAABJRU5ErkJggg=='; const mred = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAApVBMVEUzMzP/MzP+MzP+MzP+MzP+MzP9MzP+NTP+NTP/XDP+NTP+NTP+MzP+MzP+NDP+NDP+PTP9NDP+OTP9MzP+NTP+NTP+MzP5MzP/MzP/////e3v/NTP/PT3/Tk7/YWH/UVH/TU3/9/f/+fn/cnL/5eX/QED/ZGT/09P/1tb/wcH/xcX/6Oj/Z2f/hYX/aWn/b2//39//cXH/dXX/oqL/paX/T0//dnb54rKOAAAAGHRSTlMABFzrJurQ1O4Fu+8nt7nQKv1ht17tzyc2HRLDAAAAj0lEQVQIHQXABVIDARAEwLmLuwK9SXB35/9Po5JktB5P9sP5tkmSZDlwsdvtfi2mSbI84rqqvuh1k9EAZ1V1h36TNZxW1Tm0GcOhqm5hlgm4rCvQyR7c1DNYZQju6wF0MgeP9QQ22YKX1zfQplnA+8cnHDfJtIfv+kGvmyQnfQ5/B/rdJEmadtZZdTZtk+QfVeIRvDroEMEAAAAASUVORK5CYII='; const imgdm = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAACfFBMVEUAAAD+wgD+wQD+wQD/qgD/vwD1ugD+wQD/vwD+wQD+wQD+wgD+wgD5vwD+xwD9wAD7vwD5vQD+wQD1uwD/zADyuAD0uQDyuADytwDzuADxtwDztwDytwDwuAD+wgDzuAD+wgDyuQD+wgD1ugDxtwD0tgBaanv+wgBEW5H+wAD+wQDytwDxtgBIXpL+wQBPZZb+wgD+wQBmeKP+wgBXa5r//wD+wQBic5ldcZ9ccJ5SZ5dEW5H+wgD+wgBlcHD+wAD+wQBEXZD+wQD3vADzuAB0dGltfaZKX5T+xAD6vgDfnwBGXJFVaZpfcp5EWpD/wgDyuAD+wQD19fVuf7OOeiHyugT7vwD+wgCykRY8RTno6OiGgF1oeq7ksQinsc3nswf7vwHyuwr8wQL9wQD2zEf068/18OP03pj20mGBgnjv7++oscV9e2dpe6/CmxL11nf18uv11nb9wAByaCn2uwCrjBj8wADl5uZqd5J+fGiXiE3rtAXj5einsMWZiUrz8/NYaI1SZ5xCSTj8wAH3yDX9wQK0mTpTaJtabqNZbqJUaZrh5Orb3OF1aihESjdSZ5r03ZP06cSAjalpcHemiRr6vgD09PTBmhKFf1+0vNTp6enbqwpeWy/YrR7GoizIoyuwlz2dqcM2QTtvgKjKpSmReyD4vgVpdo32zUnxugv3vgb7wAT6wQz1ugD0ugAoOD/6wAn179310FgwPT2ihhvEnBFZWDHl5eb5vQCEfmDR1Nvv8PLr6+uEkrFARzi4lBW3lBWMgljS1+Ht7e2VoLs/RziSfCC6wdivjxdHTDbN0t7n6e34vQLutwV/cCb4vQD10V318ef2yTv0uQDkLrBbAAAAT3RSTlMATOr6AwQ4shjgmfhtLBf5/vJjNQWgSfyz2PuA8CT3wOdUvsaHMR9+ZCn+jDi3t9Au+fR22AKW7+XlyjiC+zJB0Typ+MPO9xgaMwg61+5oF3I9zwAAAY1JREFUeAFtzfObG1EUxvETu7Zt2zb63snERVMbTZPatm3b7tr2/kN7JzO7d7PPfn79Pue8pLE6LbamzZr37NWbEjSxO6DyfenakgSdHkJ5h45G0rQwoL7brLVJuxBB9Y8NVDf0aCjatg1xdmD7Q8B/qwRAzAt4YxHWvhWR1QFcLgOWf10J4EQACFxBlHUncgK4+/PX7z+PwL1OS8/IzYOPtSOygCsofLG7FFzYEwx6wpBYJxPZ0Jhq1pm6QPjwftVqxH1mg8ggwqtjx6/e3KrYf+CgmbpBI+1ZukyWVxQrDh0+4qIeiPv47tr1G9tkOd+tuPN3Xx/qC27N2nXrN2zcpBVu85Z+1H8AENmxc9cnCf9FOZo0mGgIpIrKKgkQhds7lGjY8G/ff/jB3ePlvlYejCCikSdPnYbizNlz5y9cVL9dGsXL6DFQ+R8/efrsuTv0cuy48RMmEmecNBm13rxNTkmdQnWmToNGyszKzplOgkk3Qw9IvpmzZheF5sylBMZ5882uBbRw0eIlpKgB/8u5fuwF0eAAAAAASUVORK5CYII='; const imgdma = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAABsFBMVEUAAAD+wQD+wgD/qgD+wQD/vwD+wQD+wgD+wgD+wQD+xwBatlz/vwD+wQBft1n+wQDxtwD1ugD9wADyuAD0uQD/zAD7vwD5vQDxtwDzuADyuQDztwDyuADytwDytwDytwDwuAD+wgD0tgCstyvzuAD1uwD+wgD+wgD+wgD+wAD+wQD+wQD+wgD+wQD+wgD//wD+wQD+wgD+wgD+wAD+wQD+wQD+xACtvC1Ztl3/wgD///97uEnyuAD+wQCBu1CWujp7xX32uwCOeiGrjBiykRabx2qc1J5nvWryugRat108RTn7vwH7vwD+wgD9wADxwAb4vQB/cCaSfCAoOD95tkmGt0CihhteWy+ReyDBmhIwPT1HTDb8wAB6t0n6vgD7wAT2zUn03ZP06cR4wXQ2QTv9wQD2zEf068/18OP03pj20mF5ulhyaCnutwX11nf18uv11nb6wQzbqwr10V318ef2yTvksQjCmxI/Rzj6wAn179310FimiRr8wAH3yDX9wQKV0ZdZWDFARzj0uQD5vQDnswdCSTi4lBVESjeKukCvjxe3lBV1aij0ugD4vQLEnBHgcTooAAAAOXRSTlMA6kwD+gTgbfiyF+gYmd5jh8b5/EkF/vL72FSAoLOM8CT3MVjANee+fin+ty75dgKWgvtB0akaVEpkodaYAAABOUlEQVR4XnXPVXMiURCG4SYES4C4u7uvfSO4S9zd3d3d1/5yOAWEGYq8N33xVFdXUyS9RqfOzM3LSK8kWSkGLcIF/lbXSCBJgVi9+UXKKKQlQ9q0UKyKbMgBeBRKwzcUiM+alc3EAJzsA8HLfwDsHsBj7xYKcoj0WuBPH3A88ATg2QE4XmEVCok0AMbGh//fjQDA6P3L79N+BIQSIh0AvE8sbm4x8dt8PpsfolCmIjUS9SCUU0UMesx8KKfTxPODQ1UkecbsZXGchQ0j1UZBnJySipfqwjAzOze/IJd6BkvLK6tr6xtyaWgEurd3dvdE8HKhJogHh0ciACcnyUXU3HJ2fhFEAqHWq+sbsEwWFsfdsuEOSVs7wsXfIVJ2dCYUVte3r4RUSd8VeJNKKn2m/PHTyMTlcjP49QE0u4VtSVu7kQAAAABJRU5ErkJggg=='; const imgdmd = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAZCAMAAACM5megAAAAllBMVEUAAAB/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3+AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAx6H3iAAAAMXRSTlMABAgMFBgcICQoLDA8QERITFBUWGBkaGx4fICDj5OXo6evs7e7v8PH09ff4+fr8/f7vr5GKgAAAN1JREFUGBl9wY1agjAABdAbIoSCWiIJLn8yLKNN7vu/XBvQJ87JOegZLfJDaew3U7ilklcfAW5EiTb7JGtRGFtq8hV9BTsntH5orNH3VrNx9mB4kkYdo29xoUPlAwgCtIKaLgJAqkI0BJ0qABEFGme6xQBUCXhhOOUDuycI7jCRHCAlmSDnsEsGrDjgmL6MAYxOfGyGTiwquikPV0s6bdF3oIMao+9Z8d4Gt5KadxJYMt7xYclok7AJar+KRvVFrYTtSC1Ca07tHbZvkhU6KbUlbPOiyCfo+OuiWOHfHxHEYF/PvYVrAAAAAElFTkSuQmCC'; const imgyto = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAACJVBMVEX///+qAADMMzP/MzPjKiXbJiPVIyPZJSPFGx/QIiLBGB7cKSXRIiLeKSnkKyfOICHcIiLRISLJHB7jKybCGB/QISHVKSDgKifMGRnhKyXMHR/CGR3ZJSPiLCbdKSXiKybFFyLCGR7WJCLdJyTDGB3JHSDhKiXIHB/ZJiPMHiHQIiLXIyPTIyLKHR/FGCDFGh/lMxnjKyXDGR3GGx/cJyTEGR7BGh7NICDUIiLOHiPcLiLiKyXgKSXhKyXPHyHXJSPNICDgKibgKSbJHB/XJCPnLiLfKSXfKSTfKSbDGR7EGR7KHB/CGR3CGB3CGB7BGB7BGB3BGR3////NHyHLHiDo4ODWJCPMHiD//v7p4eHaJyTZJiTYJiTOICHXJSPYJSPPICHeKSXQISHVJCPunZzFGh/UIyPqmpvnzMv89PTlxMTYUVL78vL08fHomZrzzM399/f+/Pzm09PXTk7QNDbfKiXGGx/pmprnj47XSUvktrbompryxMXVOTncKCXKHSDHHB/t5+f7+vrdKCXbJyTsnJvcOTfhgYDIHB/18fHqm5v05eXaMzHZVFTYTEvHGx/++vrZLy3spKThiYnTLi78+vrs19fqnJzYKynVNDXjrq7VPT7rm5vJHSDebm3XKCbRISLZWFrTIyLSIiLtrKzEGh7cZmXWJiXgKibvtLTWQ0Tlvr7bXVzfd3bwvL3sm5vjW1nTIiLDGh7hKybtnJviKybCGR58TkH5AAAAUnRSTlMAAwUFie17+rn8r7n8HzqvFu9b73vWH1sK54nnida5/BaYr1uJ7fqal+cWOu/6H5oKr/q5mls6H9Y6Fnzte3vnfJeYmOcW7Zqa7e2Y1u/8/O/WqnF1KAAAAb9JREFUeF6FzGOb61AYheGV1B3btu05tLHbsY1j27Zt2/h9k7SnyZt0p7m/ruda0BAi59VkxGVlxWXUtEUKMBJhTflLpFgjwNO6qPC3TuHiZQiStPwDR3sStCwr9hpYaQFRnTliKLOa/IWNhBCmftafDqk+0OUdM5EHn2jbGRO2aMiKexU/zvVyFUOS6OhTjG85cKWPw5EIIL1fNc7Y5fM3+4OlA8KCIdUfxtjde18fDOktFVA2SEih5OL0s+eDOmWwdxJnmc+pk7Pv3ndq2JE7Rsih/7Tn85cxKhfNk8R3qQmcdhy6SpZmlL8injDV1p6OR9eUpRyun4Qc0tNduwOLC+GviUuMmrl9R1nCEfOCoOGO+w/JEoOEUWJKyW7cOjpKJSBqmNjP/Ha+eTysFYX5A4Q/7P74aUBvIVo8hBx2fzvoCdYCoYSEhxk7stnDUSIAqV2qbdtfdnGlAmiq8Cr2ePkqmiBZctzUGshKC56aKCiFT+wFE7H4r+hESEUIEOuuh1AnQpHs3GfImQxCrJowUCVCq2HVW47VDQiSnVP7S6c2Jxs8lflp/4i0/EoYERrj3WvXrd+wcZM7vlEANQfRAClqAtKfNQAAAABJRU5ErkJggg=='; const regexdate = /joinedDateText(.*?)ext":"(.*?)ext":"(.*?)"}/; const regexdatemob = /joined_date_text(.*?)"}, {"text": "(.*?)"}]/; const regexid = /"video_id":"(.*?)"/; const regexlinew = /"logged_in","value":"(.*?)"/; const regexliold = /"logged_in":"(.*?)"/; const regexun = /"user_display_name":"(.*?)"/; const regexlang = /"host_language":"(.*?)"/; const regexlangmob = /\\"host_language\\": \\"(.*?)\\"/; const regexannyto = /(.*)(\r\n|\n\r|\n)([\W\w]+)/; const ERKYurl = 'https://raw.githubusercontent.com/FeignedAccomplice/Un-Yt-Kb-Rg/master/Un-Yt-Kb-Rg.CSV'; const annYTOurl = 'https://raw.githubusercontent.com/YTObserver/YT-ACC-DB/master/announcement.txt'; const minDCTime = 36*61; const maxDCTime = 71*58; const alerturl = 'https://кремлеботы.рф/alert'; const reporturl = 'tg://resolve?domain=observers_chat'; var alertSent = false; var annYTOtxt = []; var arrayERKY = []; var arrayListP1 = []; var arrayListC1 = []; var arrayListC2 = []; var arrayListC3 = []; var orderedClicksArray = []; var bDTaskSet = 0; var bDBlur = 0; var ytmode = 0; var listqueue = 0; var descc1 = ''; var descc2 = ''; var descc3 = ''; var iconsdef = ["\uD83D\uDCCC", "\uD83D\uDD32", "\uD83D\uDD34", "\uD83D\uDD3B"]; const iconstyledef = 'font-family: Segoe UI Symbol; line-height: 1em;'; const iconp1 = '<span style="' + iconstyledef + '">' + iconsdef[0] + '</span> '; const iconc1 = '<span style="' + iconstyledef + '">' + iconsdef[1] + '</span> '; const iconc2 = '<span style="' + iconstyledef + '">' + iconsdef[2] + '</span> '; const iconc3 = '<span style="' + iconstyledef + '">' + iconsdef[3] + '</span> '; var txtlistpadd = '\u2003<span id="listpadd" style="cursor: pointer; ' + iconstyledef + '" title="Добавить в закладки">' + iconsdef[0] + '</span>'; if (window.location.hostname == "dislikemeter.com" || window.location.hostname == "www.dislikemeter.com") { var videoid = getURLParameter('v', location.search); if (videoid) { waitForKeyElements('input#form_vid', function dmIDins(jNode) { var pNode = jNode[0]; pNode.value = videoid; }); return; } } else if (window.location.pathname == '/live_chat_replay' || window.location.pathname == '/live_chat') { var requestDB = new XMLHttpRequest(); requestDB.onreadystatechange = function() { if (requestDB.readyState === 4) { if (requestDB.status === 404) { console.log("[MetaBot for Youtube - Chat] XMLHttpRequest done: ERKY-db not found."); } if (requestDB.status === 200) { var responseDB = requestDB.responseText; if (responseDB !== "") { console.log("[MetaBot for Youtube - Chat] XMLHttpRequest done: ERKY-db loaded."); arrayERKY = responseDB.match(/[^\r\n=]+/g); waitForKeyElements('a.ytd-menu-navigation-item-renderer', parsechat); } else { console.log("[MetaBot for Youtube] XMLHttpRequest failed."); } } } }; requestDB.open("GET", ERKYurl, true); requestDB.send(null); } else { if (document.querySelector("meta[http-equiv='origin-trial']")) { console.log("[MetaBot for Youtube] YouTube New design detected."); ytmode = 1; } else if (document.querySelector("meta[http-equiv='Content-Type']")) { console.log("[MetaBot for Youtube] YouTube Mobile mode detected."); ytmode = 3; } else { console.log("[MetaBot for Youtube] YouTube Classic design detected."); ytmode = 2; txtlistpadd = '\u2003<span id="listpadd" style="cursor: pointer; color: #767676;' + iconstyledef + '" title="Добавить в закладки">' + iconsdef[0] + '</span>'; } if (ytmode !== 3) { listqueue++; getlist(filllist, -1, annYTOurl); } listqueue++; getlist(filllist, 0, ERKYurl); if (GM_config.get('option4') === true) { arrayListP1 = GM_config.get('listp1').match(/[^\r\n=]+/g); if (GM_config.get('listc1') !== '') { listqueue++; getlist(filllist, 1, GM_config.get('listc1')); } if (GM_config.get('listc2') !== '') { listqueue++; getlist(filllist, 2, GM_config.get('listc2')); } if (GM_config.get('listc3') !== '') { listqueue++; getlist(filllist, 3, GM_config.get('listc3')); } } waitforlists(); } function filllist(numArr, response, code, url) { if (code !== 200) { console.log("[MetaBot for Youtube] List load error. URL " + url + " Code " + code); } else { switch (numArr) { case -1: annYTOtxt = regexannyto.exec(response); var dbname = "YTO announcement"; switch (ytmode) { case 1: waitForKeyElements('ytd-comments-header-renderer.ytd-item-section-renderer', insertannNew); break; case 2: waitForKeyElements('div.comments-header-renderer', insertann); } break; case 0: arrayERKY = response.match(/[^\r\n=]+/g); var dbname = "ERKY-db"; break; case 1: arrayListC1 = response.match(/[^\r\n=]+/g); var dbname = "Custom list #1"; descc1 = '[' + (arrayListC1.length / 2 - 1) + '] ' + Aparse(arrayListC1[0]) + ': ' + Aparse(arrayListC1[1]) + '<br>\u2003'; break; case 2: arrayListC2 = response.match(/[^\r\n=]+/g); var dbname = "Custom list #2"; descc2 = '[' + (arrayListC2.length / 2 - 1) + '] ' + Aparse(arrayListC2[0]) + ': ' + Aparse(arrayListC2[1]) + '<br>\u2003'; break; case 3: arrayListC3 = response.match(/[^\r\n=]+/g); var dbname = "Custom list #3"; descc3 = '[' + (arrayListC3.length / 2 - 1) + '] ' + Aparse(arrayListC3[0]) + ': ' + Aparse(arrayListC3[1]) + '<br>\u2003'; } if (code === 200) { console.log("[MetaBot for Youtube] " + dbname + " loaded. Code " + code); } else { console.log("[MetaBot for Youtube] " + dbname + " load error. Code " + code); } } listqueue--; } function waitforlists() { if (listqueue === 0) { switch (ytmode) { case 1: spinnercheckNew(); waitForKeyElements('div#main.style-scope.ytd-comment-renderer', parseitemNew); waitForKeyElements('yt-view-count-renderer.style-scope.ytd-video-primary-info-renderer', preparedmNew); waitForKeyElements('div#channel-header.ytd-c4-tabbed-header-renderer', insertchanNew); break; case 2: waitForKeyElements('.comment-renderer-header', parseitem); waitForKeyElements('div#watch7-views-info', insertdm); waitForKeyElements('div#c4-primary-header-contents.primary-header-contents.clearfix', insertchan); break; case 3: waitForKeyElements('div.brb', parseitemMob); } return; } else { setTimeout(waitforlists, 500); } } function parsechat(jNode) { if ($(jNode)[0].hasAttribute('href')) { var deftxt = $(jNode).find('yt-formatted-string.ytd-menu-navigation-item-renderer')[0].innerHTML; markchatmenu(jNode, deftxt); var mutationObserver = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { markchatmenu(jNode, deftxt); }); }); mutationObserver.observe($(jNode)[0], { attributes: true, attributeFilter: ['href'], characterData: false, childList: false, subtree: false, attributeOldValue: false, characterDataOldValue: false }); } } function markchatmenu(jNode, deftxt) { var userID = $(jNode)[0].href.split('/').pop(); var foundID = arrayERKY.indexOf(userID); if (foundID > -1) { $(jNode).parent()[0].style.backgroundColor = 'rgba(255,50,50,0.3)'; $(jNode).find('yt-formatted-string.ytd-menu-navigation-item-renderer')[0].innerHTML = deftxt + '<br><img src="' + mred + '" /> ' + arrayERKY[foundID + 1]; } else { $(jNode).parent()[0].style.backgroundColor = ''; $(jNode).find('yt-formatted-string.ytd-menu-navigation-item-renderer')[0].innerHTML = deftxt; } } function spinnercheckNew() { waitForKeyElements('paper-spinner-lite.ytd-item-section-renderer[aria-hidden="true"]', function(jNode) { if (getURLParameter('v', location.search) === null) { return; } console.log("[MetaBot for Youtube] Comment sorting spinner found."); var mutationObserver = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if ($(jNode).find("#spinnerContainer").hasClass("cooldown")) { setTimeout(recheckallNew, 2000); } else { $('div#main.style-scope.ytd-comment-renderer').each(function() { var cNode = $(this).find(".published-time-text")[0]; deleteitemNew(this, $(cNode).find("a")[0].href); }); } }); }); mutationObserver.observe($(jNode)[0], { attributes: true, attributeFilter: ['active'], characterData: false, childList: false, subtree: true, attributeOldValue: false, characterDataOldValue: false }); }, false); waitForKeyElements('div#continuations.ytd-item-section-renderer', function(jNode) { if (getURLParameter('v', location.search) === null) { return; } console.log("[MetaBot for Youtube] Comment loading spinner found."); var mutationObserver = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (!$(jNode).find("#spinnerContainer").hasClass("cooldown")) { setTimeout(recheckallNew, 2000); } }); }); mutationObserver.observe($(jNode)[0], { attributes: true, attributeFilter: ['active'], characterData: false, childList: false, subtree: true, attributeOldValue: false, characterDataOldValue: false }); }, false); waitForKeyElements('paper-spinner#spinner.yt-next-continuation[active]', function(jNode) { if (getURLParameter('v', location.search) === null) { return; } console.log("[MetaBot for Youtube] Comment replies loading spinner found."); var mutationObserver = new MutationObserver(function(mutations) { if (mutations[0].removedNodes) { mutationObserver.disconnect(); setTimeout(recheckallNew, 2000); } }); mutationObserver.observe($(jNode)[0].parentNode, { attributes: true, characterData: false, childList: false, subtree: false, attributeOldValue: false, characterDataOldValue: false }); }, false); } function recheckallNew(){ $('div#main.style-scope.ytd-comment-renderer').each(function() { recheckNew(this); }); } function insertchan(jNode) { var noticespan = document.createElement('div'); var chanURL = $(jNode).find('a.spf-link.branded-page-header-title-link.yt-uix-sessionlink')[0].href; var userID = chanURL.split('/').pop(); var foundID = arrayERKY.indexOf(userID); if (foundID > -1) { noticespan.innerHTML = '<img src="' + mred + '" /> Пользователь найден в ЕРКЮ, дата регистрации: <a href="' + chanURL + '/about" title="Открыть страницу с датой регистрации">' + arrayERKY[foundID + 1] + "</a>"; noticespan.style = 'background:rgba(255,50,50,0.3);border-radius:5px;padding:4px 7px 4px 7px'; } else { noticespan.innerHTML = 'Пользователь не найден в ЕРКЮ <a href="' + chanURL + '/about"><img src="' + minf + '" title="Открыть страницу с датой регистрации" /></a>'; noticespan.style = 'background:rgba(100,100,100,0.2);border-radius:5px;padding:4px 7px 4px 7px'; } noticespan.id = 'erkynotice'; $(jNode).find('h1.branded-page-header-title').append(noticespan); } function insertchanNew(jNode) { this.addEventListener('yt-navigate-finish', function insertchanNewR() { this.removeEventListener('yt-navigate-finish', insertchanNewR); setTimeout(insertchanNew, 300, jNode); }); var chanURL = window.location.protocol + '//' + window.location.hostname + window.location.pathname.replace(/\/featured|\/videos|\/playlists|\/channels|\/discussion|\/about/i, ''); if (chanURL.slice(-1) == '/') { chanURL = chanURL.slice(0, -1); } var reuse = false; var userID = chanURL.split('/').pop(); if ($(jNode).find('span#subscriber-count.ytd-c4-tabbed-header-renderer')[0]) { var noticespan = $(jNode).find('span#subscriber-count.ytd-c4-tabbed-header-renderer')[0]; reuse = true; } else { var noticespan = document.createElement('span'); noticespan.id = 'subscriber-count'; noticespan.classList.add("ytd-c4-tabbed-header-renderer"); } var foundID = arrayERKY.indexOf(userID); if (foundID > -1) { noticespan.innerHTML = '<img src="' + mred + '" /> Пользователь найден в ЕРКЮ, дата регистрации: <a href="' + chanURL + '/about" style="color:hsl(206.1, 79.3%, 52.7%);text-decoration:none" title="Открыть страницу с датой регистрации">' + arrayERKY[foundID + 1] + "</a>"; noticespan.style = 'background:rgba(255,50,50,0.3);border-radius:5px;padding:4px 7px 4px 7px;font-weight:400;line-height:3rem;text-transform:none;color:var(--yt-lightsource-primary-title-color)'; } else { noticespan.innerHTML = 'Пользователь не найден в ЕРКЮ <a href="' + chanURL + '/about"><img src="' + minf + '" title="Открыть страницу с датой регистрации" /></a>'; noticespan.style = 'background:rgba(100,100,100,0.2);border-radius:5px;padding:4px 7px 4px 7px;font-weight:400;line-height:3rem;text-transform:none;color:var(--yt-lightsource-primary-title-color)'; } if (!reuse) { $(jNode).find('ytd-channel-name#channel-name.ytd-c4-tabbed-header-renderer').after(noticespan); $(jNode).find('span#subscriber-count.ytd-c4-tabbed-header-renderer').after('<br>'); } } function insertdm(jNode) { var videoid = getURLParameter('v', location.search); var pNode = $(jNode)[0]; var newspan = document.createElement('span'); newspan.innerHTML = '<a id="dmAdd" title="Добавить видео на анализатор Дизлайкметр" href="https://dislikemeter.com/?v=' + videoid + '"><img src="' + imgdma + '" /></a><span style="padding:0 1em 0 0"></span><a style="padding:0 0 0 1px" id="dmGo" title="Открыть статистику видео на анализаторе Дизлайкметр" href="https://dislikemeter.com/video/' + videoid + '" ><img src="' + imgdm + '" /></a>'; newspan.id = 'dmPanel'; $(pNode).css('text-align', 'right'); pNode.insertBefore(newspan, pNode.firstChild); $(pNode).find("#dmPanel")[0].addEventListener("click", function dmClick() { this.removeEventListener("click", dmClick); var newspan = document.createElement('span'); newspan.innerHTML = '<a target="_blank" title="Помочь проекту Дизлайкметр" href="https://dislikemeter.com/?donate"><img src="' + imgdmd + '" /></a><span style="padding:0 1em 0 0"></span>'; $(pNode).find("#dmPanel")[0].insertBefore(newspan, $(pNode).find("#dmPanel")[0].firstChild); }, false); $(pNode).find("#dmPanel")[0].addEventListener("mouseover", function dmOver() { this.removeEventListener("mouseover", dmOver); $(this).find("#dmAdd")[0].target = "_blank"; $(this).find("#dmGo")[0].target = "_blank"; }, false); } function preparedmNew(jNode) { this.addEventListener('yt-navigate-finish', function preparedmNewR() { this.removeEventListener('yt-navigate-finish', preparedmNewR); setTimeout(preparedmNew, 300, jNode); }); var videoid = getURLParameter('v', location.search); if (!videoid) { console.log("[MetaBot for Youtube] Dislikemeter: video id not found."); return; } var pNode = $(jNode).parent().parent().parent().find('div#flex')[0]; if (typeof pNode === 'undefined') { console.log("[MetaBot for Youtube] Dislikemeter: node not found."); return; } pNode.innerHTML = ''; if (GM_config.get('option3')) { var btnText = $(pNode).parent().find('ytd-button-renderer.ytd-menu-renderer')[0]; if ($(btnText).find('yt-formatted-string#text').length > 0) { $(btnText).find('yt-formatted-string#text').html(''); } if (!$(pNode).parent().find('ytd-sentiment-bar-renderer#sentiment').is(":visible")) { btnText = $(pNode).parent().find('ytd-toggle-button-renderer.ytd-menu-renderer.force-icon-button')[0]; $(btnText).find('yt-formatted-string#text').html(''); btnText = $(pNode).parent().find('ytd-toggle-button-renderer.ytd-menu-renderer.force-icon-button')[1]; $(btnText).find('yt-formatted-string#text').html(''); } } console.log("[MetaBot for Youtube] Dislikemeter: requesting data for video id " + videoid); getlist(insertdmNew, pNode, 'https://dislikemeter.com/iframe/?vid=' + videoid); } function insertdmNew(jNode, response, code, url) { if (response.indexOf('"submit"') >= 0){ console.log("[MetaBot for Youtube] Dislikemeter: video already added."); var dmurl = url.replace('iframe/?vid=', 'video/'); var dmtxt = 'Открыть статистику видео на анализаторе Дизлайкметр'; var dmclr = 'var(--yt-spec-call-to-action)'; } else { console.log("[MetaBot for Youtube] Dislikemeter: video not added yet."); var dmurl = url.replace('iframe/?vid=', '?v='); var dmtxt = 'Добавить видео на анализатор Дизлайкметр'; var dmclr = 'var(--yt-spec-icon-inactive)'; } jNode.style.textAlign = "right"; var dmbutton = document.createElement('ytd-button-renderer'); dmbutton.id = 'dmbutton'; dmbutton.setAttribute('button-renderer', ''); dmbutton.setAttribute('is-icon-button', ''); dmbutton.classList.add("style-scope"); dmbutton.classList.add("ytd-menu-renderer"); dmbutton.classList.add("force-icon-button"); dmbutton.classList.add("style-default"); dmbutton.classList.add("size-default"); dmbutton.style.marginTop = "3px"; dmbutton.style.marginRight = "4px"; $(jNode).prepend(dmbutton); $(jNode).find('ytd-button-renderer#dmbutton').html('<a class="yt-simple-endpoint style-scope ytd-button-renderer"><yt-icon-button id="button" class="style-scope ytd-button-renderer style-default size-default" style="padding:8px;width:36px;height:36px;color:rgb(255,200,0)" onclick="window.open(\'' + dmurl + '\', \'_blank\');"><svg viewBox="0 0 20 20" preserveAspectRatio="xMidYMid meet" focusable="false" class="style-scope yt-icon" style="pointer-events: none; display: block; width: 100%; height: 100%; fill:' + dmclr + '"><g class="style-scope yt-icon"><path d="m0 2c0 5.5 8 5.5 8 0 0-1-2-1-2 0 0 3-4 3-4 0 0-1-2-1-2 0m12 0c0 5.5 8 5.5 8 0 0-1-2-1-2 0 0 3-4 3-4 0 0-1-2-1-2 0m-12 16q2-6.5 10-6.5v2q-6 0-8 4.5c0 0.5-2 0.7-2 0m6 2v-3l4-1v4m1 0v-8h4v8m1 0v-11l4-1v12" class="style-scope yt-icon"></path></g></svg></yt-icon-button><paper-tooltip>' + dmtxt + '</paper-tooltip></a>'); } function insertann(jNode) { $(jNode).find('h2.comment-section-header-renderer')[0].style = 'padding-bottom:10;display:inline-flex;align-items:center;line-height:2rem'; var cfgspan = document.createElement('span'); cfgspan.innerHTML = '<span style="opacity:0.4">[</span><span style="font-family: Segoe UI Symbol; color: #848484">\uD83D\uDD27</span><span style="opacity:0.4">]</span>'; cfgspan.id = 'cfgbtn'; cfgspan.title = 'Настройки MetaBot for YouTube'; cfgspan.style = 'margin:-4px 0 0 0.5em;font-size:2.3em;height:2rem;cursor:pointer;color:#000'; $(jNode).find('h2.comment-section-header-renderer').append(cfgspan); var annspan = document.createElement('span'); annspan.innerHTML = '<span style="display:inline-flex;align-items:center"><span style="opacity:0.4">[</span><span style="font-family: Segoe UI Symbol; color: #af1611">\uD83D\uDCE3</span><span style="color:#555;font-size:0.5em;font-weight:420;margin:-1.8em 0.2em 0 0.2em;height:0.3em;text-transform:none">' + Aparse(annYTOtxt[1]) + '</span><span style="opacity:0.4">]</span></span>'; annspan.id = 'annbtn'; annspan.title = 'Последняя информация от Наблюдателя YouTube (#ЕРКЮ)'; annspan.style = 'margin:-4px 0 0 0.5em;font-size:2.3em;height:2rem;cursor:pointer;color:#000'; $(jNode).find('h2.comment-section-header-renderer').append(annspan); var ytoinfosspan = document.createElement('span'); ytoinfosspan.innerHTML = '<span style="float:left;width:40px"><img src="' + imgyto + '" width="40px" height="40px" /></span><span style="float:right;margin: 0 0 0 10px;width:520px"><span id="urlyto" style="font-weight:500;cursor:pointer" data-url="https://www.youtube.com/channel/UCwBID52XA-aajCKYuwsQxWA">Наблюдатель Youtube #ЕРКЮ</span><br><span class="yt-badge" style="margin:4px 0 4px 0;text-align:center;text-transform:none;font-weight:500;width:100%;background-color:hsla(0, 0%, 93.3%, .6)">' + Aparse(annYTOtxt[1]) + '</span><span id="annholder"></span></span>'; ytoinfosspan.id = 'ytoinfo'; ytoinfosspan.style = 'max-width:605px;margin:0 auto 1em auto;display:table'; $(ytoinfosspan).toggle(); $(jNode).find('h2.comment-section-header-renderer').after(ytoinfosspan); $(jNode).find("span#ytoinfo").toggle(); var settingsspan = document.createElement('span'); settingsspan.innerHTML = '<span style="float:left;width:100px"><img src="https://raw.githubusercontent.com/asrdri/yt-metabot-user-js/master/logo.png" width="100px" height="100px" /></span><span style="float:right;margin: 0 0 0 10px;width:460px"><span style="font-weight:500">' + GM_info.script.name + ' v' + GM_info.script.version + '</span>\u2003<span id="urlgithub" style="cursor:pointer" data-url="https://github.com/asrdri/yt-metabot-user-js/">GitHub</span>\u2003<span id="urlissues" style="cursor:pointer" data-url="https://github.com/asrdri/yt-metabot-user-js/issues">Предложения и баги</span>\u2003<span id="urllists" style="cursor:pointer" data-url="https://github.com/asrdri/yt-metabot-user-js/issues/23">Списки</span><span class="yt-badge" style="margin:4px 0 4px 0;text-align:center;text-transform:none;font-weight:500;width:100%;background-color:hsla(0, 0%, 93.3%, .6)">Настройки</span>Комментарии от известных ботов из ЕРКЮ <select id="mbcddm1"><option value="1">помечать</option><option value="2">скрывать</option></select><span id="mbcswg1"><br style="line-height:2em"><label title="Информация о наличии ботов под роликом будет отправлена на кремлеботы.рф"><input type="checkbox" id="mbcbox4">Уведомлять сервер при обнаружении ботов</label><br style="line-height:2em"><label title="Пункт 5.1.H Условий использования YouTube не нарушается - запросы отправляются со значительным интервалом"><input type="checkbox" id="mbcbox1">Автоматически ставить <span style="font-family: Segoe UI Symbol">\uD83D\uDC4E</span> комментариям от ботов из ЕРКЮ</label></span><br style="line-height:2em"><label><input type="checkbox" id="mbcbox3">Дополнительные списки</label><span id="mbcswg2"><br style="line-height:2em">' + iconp1 + ' Закладки: <input type="color" id="colorpersonal" style="height: 1rem; width: 40px"><br style="line-height:1.8em"><textarea id="listpersonal" rows="3" style="width: 440px"></textarea><br style="line-height:1.2em">Сторонние списки:<br>' + iconc1 + descc1 + '<input type="text" id="listcustom1" style="height: 1rem; width: 385px"> <input type="color" id="colorcustom1" style="height: 1rem; width: 40px"><br>' + iconc2 + descc2 + '<input type="text" id="listcustom2" style="height: 1rem; width: 385px"> <input type="color" id="colorcustom2" style="height: 1rem; width: 40px"><br>' + iconc3 + descc3 + '<input type="text" id="listcustom3" style="height: 1rem; width: 385px"> <input type="color" id="colorcustom3" style="height: 1rem; width: 40px"></span><br style="line-height:2em"><span id="classicbtn" style="cursor:pointer">Включить новый дизайн YouTube</span><br><span id="resetbtn" style="cursor:pointer">Сбросить настройки</span><span id="configsaved" class="yt-badge" style="margin:4px 0 4px 0;text-align:center;text-transform:none;font-weight:500;width:100%;background-color:hsla(0, 0%, 93.3%, .6);display:none;-webkit-transition: background-color 0.3s ease-in-out;-moz-transition: background-color 0.3s ease-in-out;-ms-transition: background-color 0.3s ease-in-out;-o-transition: background-color 0.3s ease-in-out;transition: background-color 0.3s ease-in-out;">Настройки сохранены. Для вступления в силу необходимо <span style="cursor:pointer;text-decoration: underline" onclick="javascript:window.location.reload();">\uD83D\uDD03обновить страницу</span>.</span></span>'; settingsspan.id = 'config'; settingsspan.style = 'max-width:605px;margin:0 auto 1em auto;display:table'; $(settingsspan).toggle(); $(jNode).find('h2.comment-section-header-renderer').after(settingsspan); $(jNode).find("span#config").toggle(); var annexspan = document.createElement('span'); annexspan.innerHTML = Aparse(annYTOtxt[3]); $(jNode).find('span#annholder').append(annexspan); $(jNode).find("span#cfgbtn")[0].addEventListener("click", function() { $(jNode).find("span#config").toggle(); $(jNode).find("span#ytoinfo").hide(); }, false); $(jNode).find("span#annbtn")[0].addEventListener("click", function() { $(jNode).find("span#ytoinfo").toggle(); $(jNode).find("span#config").hide(); }, false); $(jNode).find("span#cfgbtn").hover(function() { this.style.backgroundColor = 'hsl(206.1, 79.3%, 52.7%)'; }, function() { this.style.backgroundColor = ''; }); $(jNode).find("span#annbtn").hover(function() { this.style.backgroundColor = 'hsl(206.1, 79.3%, 52.7%)'; }, function() { this.style.backgroundColor = ''; }); $(jNode).find("span#classicbtn, span#resetbtn").hover(function() { this.style.textDecoration = "underline"; }, function() { this.style.textDecoration = ""; }); $(jNode).find("span#urlgithub, span#urlissues, span#urllists, span#urlyto").hover(function() { this.style.textDecoration = "underline"; this.style.color = "hsl(206.1, 79.3%, 52.7%)"; }, function() { this.style.textDecoration = ""; this.style.color = ""; }); $(jNode).find("span#urlgithub, span#urlissues, span#urllists, span#urlyto").click(function() { window.open($(this).attr('data-url')); }); $(jNode).find("span#classicbtn").click(function() { ytNewDesign(); saveconfig(jNode); }); $(jNode).find("span#resetbtn").click(function() { resetconfig(jNode); saveconfig(jNode); }); $(jNode).find("select#mbcddm1").val(GM_config.get('option1')); $(jNode).find("input#mbcbox1").prop('checked', GM_config.get('option2')); $(jNode).find("input#mbcbox3").prop('checked', GM_config.get('option4')); $(jNode).find("input#mbcbox4").prop('checked', GM_config.get('option5')); $(jNode).find("textarea#listpersonal").text(GM_config.get('listp1')); $(jNode).find("input#listcustom1").val(GM_config.get('listc1')); $(jNode).find("input#listcustom2").val(GM_config.get('listc2')); $(jNode).find("input#listcustom3").val(GM_config.get('listc3')); $(jNode).find("input#colorpersonal").val(parseColor(GM_config.get('colorp1'), false)); $(jNode).find("input#colorcustom1").val(parseColor(GM_config.get('colorc1'), false)); $(jNode).find("input#colorcustom2").val(parseColor(GM_config.get('colorc2'), false)); $(jNode).find("input#colorcustom3").val(parseColor(GM_config.get('colorc3'), false)); if ($(jNode).find("select#mbcddm1").val() == 2) { $(jNode).find("span#mbcswg1").hide(); } if ($(jNode).find("input#mbcbox3").prop('checked') == false) { $(jNode).find("span#mbcswg2").hide(); } $(jNode).find("input#mbcbox1, input#mbcbox3, input#mbcbox4, select#mbcddm1, textarea#listpersonal, input#listcustom1, input#listcustom2, input#listcustom3, input#colorpersonal, input#colorcustom1, input#colorcustom2, input#colorcustom3").change(function() { if ($(jNode).find("select#mbcddm1").val() == 2) { $(jNode).find("span#mbcswg1").hide(); } else { $(jNode).find("span#mbcswg1").show(); } if ($(jNode).find("input#mbcbox3").prop('checked') == false) { $(jNode).find("span#mbcswg2").hide(); } else { $(jNode).find("span#mbcswg2").show(); } saveconfig(jNode); }); } function insertannNew(jNode) { waitForKeyElements('div#icon-label.yt-dropdown-menu', function(jNode) { jNode[0].innerHTML = ''; $(jNode).parent()[0].setAttribute("style","margin-top:-0.1em;height:1.9em;width:2.9em"); $(jNode).parent().hover(function() { this.style.backgroundColor = 'hsl(206.1, 79.3%, 52.7%)'; }, function() { this.style.backgroundColor = ''; }); }, false); var cfgspan = document.createElement('span'); cfgspan.innerHTML = '<span style="opacity:0.4">[</span><span style="font-family: Segoe UI Symbol; color: #848484">\uD83D\uDD27</span><span style="opacity:0.4">]</span>'; cfgspan.id = 'cfgbtn'; cfgspan.title = 'Настройки MetaBot for YouTube'; cfgspan.style = 'margin:-6px 0 0 0.5em;font-size:3em;height:1.05em;display:inline-flex;align-items:center;cursor:pointer'; cfgspan.classList.add("content"); cfgspan.classList.add("ytd-video-secondary-info-renderer"); $(jNode).find('div#title').append(cfgspan); var annspan = document.createElement('span'); annspan.innerHTML = '<span style="opacity:0.4">[</span><span style="font-family: Segoe UI Symbol; color: #af1611">\uD83D\uDCE3</span><span style="font-size:0.5em;font-weight:420;margin:0 0.2em 0 0.2em">' + Aparse(annYTOtxt[1]) + '</span><span style="opacity:0.4">]</span>'; annspan.id = 'annbtn'; annspan.title = 'Последняя информация от Наблюдателя YouTube (#ЕРКЮ)'; annspan.style = 'margin:-6px 0 0 0.5em;font-size:3em;height:1.05em;display:inline-flex;align-items:center;cursor:pointer'; annspan.classList.add("content"); annspan.classList.add("ytd-video-secondary-info-renderer"); $(jNode).find('div#title').append(annspan); var ytoinfosspan = document.createElement('span'); ytoinfosspan.innerHTML = '<span style="float:left;width:40px"><img src="' + imgyto + '" width="40px" height="40px" /></span><span style="float:right;margin: 0 0 0 10px;width:585px"><span id="urlyto" style="font-weight:500;cursor:pointer" data-url="https://www.youtube.com/channel/UCwBID52XA-aajCKYuwsQxWA">Наблюдатель Youtube #ЕРКЮ</span><span class="badge badge-style-type-simple ytd-badge-supported-renderer" style="margin:4px 0 4px 0;text-align:center">' + Aparse(annYTOtxt[1]) + '</span><span id="annholder"></span></span>'; ytoinfosspan.id = 'ytoinfo'; ytoinfosspan.classList.add("description"); ytoinfosspan.classList.add("content"); ytoinfosspan.classList.add("ytd-video-secondary-info-renderer"); ytoinfosspan.style = 'font-size:1.4rem;max-width:640px;margin:-10px auto 1em auto;display:none'; $(jNode).find('div#title').after(ytoinfosspan); var settingsspan = document.createElement('span'); settingsspan.innerHTML = '<span style="float:left;width:100px"><img src="https://raw.githubusercontent.com/asrdri/yt-metabot-user-js/master/logo.png" width="100px" height="100px" /></span><span style="float:right;margin: 0 0 0 10px;width:525px"><span style="font-weight:500">' + GM_info.script.name + ' v' + GM_info.script.version + '</span>\u2003<span id="urlgithub" style="cursor:pointer" data-url="https://github.com/asrdri/yt-metabot-user-js/">GitHub</span>\u2003<span id="urlissues" style="cursor:pointer" data-url="https://github.com/asrdri/yt-metabot-user-js/issues">Предложения и баги</span>\u2003<span id="urllists" style="cursor:pointer" data-url="https://github.com/asrdri/yt-metabot-user-js/issues/23">Списки</span><span class="badge badge-style-type-simple ytd-badge-supported-renderer" style="margin:4px 0 4px 0;text-align:center">Настройки</span>Комментарии от известных ботов из ЕРКЮ <select id="mbcddm1"><option value="1">помечать</option><option value="2">скрывать</option></select><span id="mbcswg1"><br style="line-height:2em"><label title="Информация о наличии ботов под роликом будет отправлена на кремлеботы.рф"><input type="checkbox" id="mbcbox4">Уведомлять сервер при обнаружении ботов</label><br style="line-height:2em"><label title="Пункт 5.1.H Условий использования YouTube не нарушается - запросы отправляются со значительным интервалом"><input type="checkbox" id="mbcbox1">Автоматически ставить <span style="font-family: Segoe UI Symbol">\uD83D\uDC4E</span> комментариям от ботов из ЕРКЮ</label></span><br style="line-height:2em"><label title="Актуально для русского интерфейса и небольшой ширины окна браузера"><input type="checkbox" id="mbcbox2">Скрывать длинные подписи кнопок Мне (не) понравилось / Поделиться</label><br style="line-height:2em"><label><input type="checkbox" id="mbcbox3">Дополнительные списки</label><span id="mbcswg2"><br style="line-height:2em">' + iconp1 + ' Закладки: <input type="color" id="colorpersonal" style="height: 1.8rem; width: 40px"><br style="line-height:1.8em"><textarea id="listpersonal" rows="3" style="width: 500px"></textarea><br style="line-height:1.2em">Сторонние списки:<br>' + iconc1 + descc1 + '<input type="text" id="listcustom1" style="height: 1.7rem; width: 440px"> <input type="color" id="colorcustom1" style="height: 1.8rem; width: 40px"><br>' + iconc2 + descc2 + '<input type="text" id="listcustom2" style="height: 1.7rem; width: 440px"> <input type="color" id="colorcustom2" style="height: 1.8rem; width: 40px"><br>' + iconc3 + descc3 + '<input type="text" id="listcustom3" style="height: 1.7rem; width: 440px"> <input type="color" id="colorcustom3" style="height: 1.8rem; width: 40px"></span><br style="line-height:2em"><span id="classicbtn" style="cursor:pointer">Включить классический дизайн YouTube</span><br><span id="resetbtn" style="cursor:pointer">Сбросить настройки</span><span id="configsaved" class="badge badge-style-type-simple ytd-badge-supported-renderer" style="margin:4px 0 4px 0;text-align:center;display:none;-webkit-transition: background-color 0.3s ease-in-out;-moz-transition: background-color 0.3s ease-in-out;-ms-transition: background-color 0.3s ease-in-out;-o-transition: background-color 0.3s ease-in-out;transition: background-color 0.3s ease-in-out;">Настройки сохранены. Для вступления в силу необходимо <span style="cursor:pointer;text-decoration: underline" onclick="javascript:window.location.reload();"><span style="font-family: Segoe UI Symbol">\uD83D\uDD03</span>обновить страницу</span>.</span></span>'; settingsspan.id = 'config'; settingsspan.classList.add("description"); settingsspan.classList.add("content"); settingsspan.classList.add("ytd-video-secondary-info-renderer"); settingsspan.style = 'font-size:1.4rem;max-width:635px;margin:-10px auto 1em auto;display:none'; $(jNode).find('div#title').after(settingsspan); var annexspan = document.createElement('span'); annexspan.innerHTML = Aparse(annYTOtxt[3]); annexspan.classList.add("content"); annexspan.classList.add("ytd-video-secondary-info-renderer"); $(jNode).find('span#annholder').append(annexspan); $(jNode).find("span#cfgbtn")[0].addEventListener("click", function() { $(jNode).find("span#config").toggle(); $(jNode).find("span#ytoinfo").hide(); }, false); $(jNode).find("span#annbtn")[0].addEventListener("click", function() { $(jNode).find("span#ytoinfo").toggle(); $(jNode).find("span#config").hide(); }, false); $(jNode).find("span#cfgbtn").hover(function() { this.style.backgroundColor = 'hsl(206.1, 79.3%, 52.7%)'; }, function() { this.style.backgroundColor = ''; }); $(jNode).find("span#annbtn").hover(function() { this.style.backgroundColor = 'hsl(206.1, 79.3%, 52.7%)'; }, function() { this.style.backgroundColor = ''; }); $(jNode).find("span#classicbtn, span#resetbtn").hover(function() { this.style.textDecoration = "underline"; }, function() { this.style.textDecoration = ""; }); $(jNode).find("span#urlgithub, span#urlissues, span#urllists, span#urlyto").hover(function() { this.style.textDecoration = "underline"; this.style.color = "hsl(206.1, 79.3%, 52.7%)"; }, function() { this.style.textDecoration = ""; this.style.color = ""; }); $(jNode).find("span#urlgithub, span#urlissues, span#urllists, span#urlyto").click(function() { window.open($(this).attr('data-url')); }); $(jNode).find("span#classicbtn").click(function() { ytOldDesign(); saveconfigNew(jNode); }); $(jNode).find("span#resetbtn").click(function() { resetconfigNew(jNode); saveconfigNew(jNode); }); $(jNode).find("select#mbcddm1").val(GM_config.get('option1')); $(jNode).find("input#mbcbox1").prop('checked', GM_config.get('option2')); $(jNode).find("input#mbcbox2").prop('checked', GM_config.get('option3')); $(jNode).find("input#mbcbox3").prop('checked', GM_config.get('option4')); $(jNode).find("input#mbcbox4").prop('checked', GM_config.get('option5')); $(jNode).find("textarea#listpersonal").text(GM_config.get('listp1')); $(jNode).find("input#listcustom1").val(GM_config.get('listc1')); $(jNode).find("input#listcustom2").val(GM_config.get('listc2')); $(jNode).find("input#listcustom3").val(GM_config.get('listc3')); $(jNode).find("input#colorpersonal").val(parseColor(GM_config.get('colorp1'), false)); $(jNode).find("input#colorcustom1").val(parseColor(GM_config.get('colorc1'), false)); $(jNode).find("input#colorcustom2").val(parseColor(GM_config.get('colorc2'), false)); $(jNode).find("input#colorcustom3").val(parseColor(GM_config.get('colorc3'), false)); if ($(jNode).find("select#mbcddm1").val() == 2) { $(jNode).find("span#mbcswg1").hide(); } if ($(jNode).find("input#mbcbox3").prop('checked') == false) { $(jNode).find("span#mbcswg2").hide(); } $(jNode).find("input#mbcbox1, input#mbcbox2, input#mbcbox3, input#mbcbox4, select#mbcddm1, textarea#listpersonal, input#listcustom1, input#listcustom2, input#listcustom3, input#colorpersonal, input#colorcustom1, input#colorcustom2, input#colorcustom3").change(function() { if ($(jNode).find("select#mbcddm1").val() == 2) { $(jNode).find("span#mbcswg1").hide(); } else { $(jNode).find("span#mbcswg1").show(); } if ($(jNode).find("input#mbcbox3").prop('checked') == false) { $(jNode).find("span#mbcswg2").hide(); } else { $(jNode).find("span#mbcswg2").show(); } saveconfigNew(jNode); }); } function saveconfig(jNode) { GM_config.set('option1', $(jNode).find("select#mbcddm1").val()); GM_config.set('option2', $(jNode).find("input#mbcbox1").is(":checked")); GM_config.set('option4', $(jNode).find("input#mbcbox3").is(":checked")); GM_config.set('option5', $(jNode).find("input#mbcbox4").is(":checked")); GM_config.set('listp1', $(jNode).find("textarea#listpersonal").val()); GM_config.set('listc1', $(jNode).find("input#listcustom1").val()); GM_config.set('listc2', $(jNode).find("input#listcustom2").val()); GM_config.set('listc3', $(jNode).find("input#listcustom3").val()); GM_config.set('colorp1', parseColor($(jNode).find("input#colorpersonal").val(), true)); GM_config.set('colorc1', parseColor($(jNode).find("input#colorcustom1").val(), true)); GM_config.set('colorc2', parseColor($(jNode).find("input#colorcustom2").val(), true)); GM_config.set('colorc3', parseColor($(jNode).find("input#colorcustom3").val(), true)); arrayListP1 = GM_config.get('listp1').match(/[^\r\n=]+/g); GM_config.save(); $(jNode).find("span#configsaved").show(); $(jNode).find("span#configsaved")[0].style.backgroundColor = 'rgba(40,150,230,1)'; setTimeout(function(){$(jNode).find("span#configsaved")[0].style.backgroundColor = 'rgba(40,150,230,0)';}, 400); } function saveconfigNew(jNode) { GM_config.set('option1', $(jNode).find("select#mbcddm1").val()); GM_config.set('option2', $(jNode).find("input#mbcbox1").is(":checked")); GM_config.set('option3', $(jNode).find("input#mbcbox2").is(":checked")); GM_config.set('option4', $(jNode).find("input#mbcbox3").is(":checked")); GM_config.set('option5', $(jNode).find("input#mbcbox4").is(":checked")); GM_config.set('listp1', $(jNode).find("textarea#listpersonal").val()); GM_config.set('listc1', $(jNode).find("input#listcustom1").val()); GM_config.set('listc2', $(jNode).find("input#listcustom2").val()); GM_config.set('listc3', $(jNode).find("input#listcustom3").val()); GM_config.set('colorp1', parseColor($(jNode).find("input#colorpersonal").val(), true)); GM_config.set('colorc1', parseColor($(jNode).find("input#colorcustom1").val(), true)); GM_config.set('colorc2', parseColor($(jNode).find("input#colorcustom2").val(), true)); GM_config.set('colorc3', parseColor($(jNode).find("input#colorcustom3").val(), true)); arrayListP1 = GM_config.get('listp1').match(/[^\r\n=]+/g); GM_config.save(); $(jNode).find("span#configsaved").show(); $(jNode).find("span#configsaved")[0].style.backgroundColor = 'rgba(40,150,230,1)'; setTimeout(function(){$(jNode).find("span#configsaved")[0].style.backgroundColor = 'rgba(40,150,230,0)';}, 400); } function resetconfig(jNode) { $(jNode).find("span#mbcswg1").show(); $(jNode).find("span#mbcswg2").show(); $(jNode).find("select#mbcddm1").val(1); $(jNode).find("input#mbcbox1").prop('checked', false); $(jNode).find("input#mbcbox2").prop('checked', true); $(jNode).find("input#mbcbox3").prop('checked', true); $(jNode).find("input#mbcbox4").prop('checked', false); $(jNode).find("input#listcustom1").val('https://github.com/asrdri/yt-metabot-user-js/raw/master/list-sample.txt'); $(jNode).find("input#listcustom2").val(''); $(jNode).find("input#listcustom3").val(''); $(jNode).find("input#colorpersonal").val(parseColor(33023, false)); $(jNode).find("input#colorcustom1").val(parseColor(8388863, false)); $(jNode).find("input#colorcustom2").val(parseColor(16744448, false)); $(jNode).find("input#colorcustom3").val(parseColor(8421504, false)); } function resetconfigNew(jNode) { $(jNode).find("span#mbcswg1").show(); $(jNode).find("span#mbcswg2").show(); $(jNode).find("select#mbcddm1").val(1); $(jNode).find("input#mbcbox1").prop('checked', false); $(jNode).find("input#mbcbox2").prop('checked', true); $(jNode).find("input#mbcbox3").prop('checked', true); $(jNode).find("input#mbcbox4").prop('checked', false); $(jNode).find("input#listcustom1").val('https://github.com/asrdri/yt-metabot-user-js/raw/master/list-sample.txt'); $(jNode).find("input#listcustom2").val(''); $(jNode).find("input#listcustom3").val(''); $(jNode).find("input#colorpersonal").val(parseColor(33023, false)); $(jNode).find("input#colorcustom1").val(parseColor(8388863, false)); $(jNode).find("input#colorcustom2").val(parseColor(16744448, false)); $(jNode).find("input#colorcustom3").val(parseColor(8421504, false)); } function sendAlert(jNode) { if (alertSent || GM_config.get('option5') === false) return; if (ytmode === 1) { var commentURL = $(jNode).find('.published-time-text a').prop('href'); } else { var commentURL = $(jNode).find('.comment-renderer-time a').prop('href'); } var commendid = getURLParameter('lc', commentURL); var videoid = getURLParameter('v', commentURL); var data = $.param({v: videoid, lc: commendid}); var request = new XMLHttpRequest(); request.open("POST", alerturl, true); request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); request.send(data); alertSent = true; this.addEventListener('yt-navigate-start', function clearAlertSentFlag() { this.removeEventListener('yt-navigate-start', clearAlertSentFlag); alertSent = false; }); } function parseitem(jNode) { if (GM_config.get('option4') === true) { var spanlistpadd = txtlistpadd; } else { var spanlistpadd = ''; } var pNode = $(jNode).parent().parent()[0]; $(pNode).hover(function blockShow() { $(pNode).find("#t30sp").show(); }, function blockHide() { $(pNode).find("#t30sp").hide(); }); pNode = jNode[0]; var userID = $(jNode).find("a")[0].href.split('/').pop(); var foundID = arrayERKY.indexOf(userID); var foundIDp1 = -1; var foundIDc1 = -1; var foundIDc2 = -1; var foundIDc3 = -1; if (GM_config.get('option4') === true) { if (arrayListP1 !== null) { foundIDp1 = arrayListP1.indexOf(userID); } if (typeof arrayListC1 !== 'undefined' && arrayListC1.length > 1) { foundIDc1 = arrayListC1.indexOf(userID); } if (typeof arrayListC2 !== 'undefined' && arrayListC2.length > 1) { foundIDc2 = arrayListC2.indexOf(userID); } if (typeof arrayListC3 !== 'undefined' && arrayListC3.length > 1) { foundIDc3 = arrayListC3.indexOf(userID); } } var comURL = $(jNode).find("span.comment-renderer-time")[0]; if ($(jNode).find("span.comment-renderer-linked-comment").length > 0) { comURL = $(jNode).find("span.comment-renderer-linked-comment")[0]; } var t30span = document.createElement('span'); t30span.innerHTML = '\u2003<span id="about" style="cursor: pointer; font-family: Segoe UI Symbol; color: #767676" title="Открыть страницу с датой регистрации">\u2753</span>\u2003<span id="top30" style="cursor: pointer" title="Найти другие комментарии автора с помощью агрегатора ТОП30"><font color="#7777fa">top</font><font color="#fa7777">30</font></span>' + spanlistpadd; t30span.id = 't30sp'; t30span.style = "display:none"; if (foundID > -1) { sendAlert(jNode); console.log("[MetaBot for Youtube] user found in ERKY-db: " + userID); if (GM_config.get('option1') == 2) { foundIDp1 = -1; foundIDc1 = -1; foundIDc2 = -1; foundIDc3 = -1; var hidspan = document.createElement('span'); hidspan.innerHTML = 'Комментарий скрыт: пользователь найден в ЕРКЮ'; hidspan.classList.add('yt-badge'); hidspan.style = 'margin:0 0 10px 0;text-align:center;text-transform:none;font-weight:500;width:100%;background-color:hsla(0, 0%, 93.3%, .6)'; $(jNode).parent().parent().after(hidspan); $(jNode).parent().parent().hide(); } else { markred(pNode, arrayERKY[foundID + 1]); } $(comURL).after(t30span); } else { var newspan = document.createElement('span'); newspan.innerHTML = '<img id="checkbtn" src="' + checkb + '" title="Проверить дату регистрации" style="cursor: help" />'; newspan.id = 'checksp'; pNode.insertBefore(newspan, pNode.firstChild); t30span.innerHTML += '\u2003<span id="sendlink" style="cursor: pointer" title="Помогите пополнить список известных ботов - отправьте нам данные о подозрительном комментарии">\u27A4</span>'; $(comURL).after(t30span); $(jNode).find("img")[0].addEventListener("click", function checkcomment() { checkdate(pNode); }, false); $(jNode).find("#sendlink")[0].addEventListener("click", function displayinfo() { sendinfo(); }, false); } if (GM_config.get('option4') === true) { if (foundIDc1 > -1) { markcustom(pNode, arrayListC1[foundIDc1 + 1], 1); } if (foundIDc2 > -1) { markcustom(pNode, arrayListC2[foundIDc2 + 1], 2); } if (foundIDc3 > -1) { markcustom(pNode, arrayListC3[foundIDc3 + 1], 3); } if (foundIDp1 > -1) { if ($(jNode).find("#checkbtn").length > 0) { $(jNode).find("#checkbtn")[0].remove(); } markpersonal(pNode, arrayListP1[foundIDp1 + 1]); } $(jNode).find("#listpadd")[0].addEventListener("click", function addtolistNew() { if ($(pNode).find("span#bookmark").length > 0) { listpdel(pNode); $(jNode).find("#listpadd").html(iconsdef[0]); $(jNode).find("#listpadd")[0].title = 'Добавить в закладки'; } else { if ($(jNode).find("#checkbtn").length > 0) { $(jNode).find("#checkbtn")[0].remove(); } $(jNode).find("#listpadd").html('\u23F3'); getpage(listpadd, pNode, $(jNode).find("a")[0].href + '/about') } }, false); } $(jNode).find("#about")[0].addEventListener("click", function openabout() { window.open($(jNode).find("a")[0].href + '/about'); }, false); $(jNode).find("#top30")[0].addEventListener("click", function opent30() { window.open('https://www.t30p.ru/search.aspx?s=' + $(jNode).find("a")[0].href.split('/').pop()); }, false); } function parseitemMob(jNode) { var userID = $(jNode).find("a")[0].href.split('/').pop(); var foundID = arrayERKY.indexOf(userID); if (foundID > -1) { console.log("[MetaBot for Youtube] user found in ERKY-db: " + userID); markredMob(jNode, arrayERKY[foundID + 1]); } else { $(jNode)[0].addEventListener("touchstart", function () { $(this).data('moved', '0'); }, false); $(jNode)[0].addEventListener("touchmove", function () { $(this).data('moved', '1'); }, false); $(jNode)[0].addEventListener("touchend", function ttend() { if ($(this).data('moved') == 0){ if (['en', 'en-US', 'en-GB', 'ru', 'uk', 'be', 'bg'].indexOf(currentlangmob()) < 0) { alert('Функция поддерживается только на языках:\n \u2714 English\n \u2714 Русский\n \u2714 Українська\n \u2714 Беларуская \u2714 Български\nВы можете сменить язык интерфейса в меню настроек YouTube.'); return; } this.removeEventListener("touchend", ttend); checkdateMob(this); } }, false); } } function parseitemNew(jNode) { if (GM_config.get('option4') === true) { var spanlistpadd = txtlistpadd; } else { var spanlistpadd = ''; } var pNode = $(jNode).find("#header-author.ytd-comment-renderer")[0]; $(jNode).hover(function blockShow() { $(pNode).find("#t30sp").show(); }, function blockHide() { $(pNode).find("#t30sp").hide(); }); var userID = $(jNode).find("a")[0].href.split('/').pop(); var foundID = arrayERKY.indexOf(userID); var foundIDp1 = -1; var foundIDc1 = -1; var foundIDc2 = -1; var foundIDc3 = -1; if (GM_config.get('option4') === true) { if (arrayListP1 !== null) { foundIDp1 = arrayListP1.indexOf(userID); } if (typeof arrayListC1 !== 'undefined' && arrayListC1.length > 1) { foundIDc1 = arrayListC1.indexOf(userID); } if (typeof arrayListC2 !== 'undefined' && arrayListC2.length > 1) { foundIDc2 = arrayListC2.indexOf(userID); } if (typeof arrayListC3 !== 'undefined' && arrayListC3.length > 1) { foundIDc3 = arrayListC3.indexOf(userID); } } var comURL = $(jNode).find(".published-time-text")[0]; var t30span = document.createElement('span'); t30span.innerHTML = '\u2003<span id="about" style="cursor: pointer; ' + iconstyledef + '" title="Открыть страницу с датой регистрации">\u2753</span>\u2003<span id="top30" style="cursor: pointer" title="Найти другие комментарии автора с помощью агрегатора ТОП30"><font color="#7777fa">top</font><font color="#fa7777">30</font></span>' + spanlistpadd; t30span.id = 't30sp'; t30span.style = "display:none"; var newspan = document.createElement('span'); newspan.id = 'checksp'; if (foundID > -1) { sendAlert(jNode); console.log("[MetaBot for Youtube] user found in ERKY-db: " + userID); if (GM_config.get('option1') == 2) { foundIDp1 = -1; foundIDc1 = -1; foundIDc2 = -1; foundIDc3 = -1; var hidspan = document.createElement('span'); hidspan.innerHTML = 'Комментарий скрыт: пользователь найден в ЕРКЮ'; hidspan.classList.add('badge'); hidspan.classList.add('badge-style-type-simple'); hidspan.classList.add('ytd-badge-supported-renderer'); hidspan.style = 'margin: 0 0 10px 0;text-align:center'; $(jNode).parent().parent().after(hidspan); $(jNode).parent().parent().hide(); } else { markredNew($(pNode).parent(), arrayERKY[foundID + 1]); } $(comURL).append(t30span); $(newspan).attr('data-chan', $(jNode).find("a#author-text")[0].href); pNode.insertBefore(newspan, pNode.firstChild); } else { newspan.innerHTML = '<img id="checkbtn" src="' + checkb + '" title="Проверить дату регистрации" style="cursor: help" />'; $(newspan).attr('data-chan', $(jNode).find("a#author-text")[0].href); pNode.insertBefore(newspan, pNode.firstChild); t30span.innerHTML += '\u2003<span id="sendlink" style="cursor: pointer" title="Помогите пополнить список известных ботов - отправьте нам данные о подозрительном комментарии">\u27A4</span>'; $(comURL).append(t30span); $(jNode).find("#checkbtn")[0].addEventListener("click", function checkcommentNew() { checkdateNew($(pNode).parent()); }, false); $(jNode).find("#sendlink")[0].addEventListener("click", function displayinfoNew() { sendinfo(); }, false); } if (GM_config.get('option4') === true) { if (foundIDc1 > -1) { markcustomNew($(pNode).parent(), arrayListC1[foundIDc1 + 1], 1); } if (foundIDc2 > -1) { markcustomNew($(pNode).parent(), arrayListC2[foundIDc2 + 1], 2); } if (foundIDc3 > -1) { markcustomNew($(pNode).parent(), arrayListC3[foundIDc3 + 1], 3); } if (foundIDp1 > -1) { if ($(jNode).find("#checkbtn").length > 0) { $(jNode).find("#checkbtn")[0].remove(); } markpersonalNew($(pNode).parent(), arrayListP1[foundIDp1 + 1]); } $(jNode).find("#listpadd")[0].addEventListener("click", function addtolistNew() { if ($(pNode).find("span#bookmark").length > 0) { listpdelNew(pNode); $(jNode).find("#listpadd").html(iconsdef[0]); $(jNode).find("#listpadd")[0].title = 'Добавить в закладки'; } else { if ($(jNode).find("#checkbtn").length > 0) { $(jNode).find("#checkbtn")[0].remove(); } $(jNode).find("#listpadd").html('\u23F3'); getpage(listpaddNew, pNode, $(jNode).find("a")[0].href + '/about') } }, false); } $(jNode).find("#about")[0].addEventListener("click", function openaboutNew() { window.open($(jNode).find("a")[0].href + '/about'); }, false); $(jNode).find("#top30")[0].addEventListener("click", function opent30New() { window.open('https://www.t30p.ru/search.aspx?s=' + $(jNode).find("a")[0].href.split('/').pop()); }, false); this.addEventListener('yt-navigate-start', function wipeitemNewS() { this.removeEventListener('yt-navigate-start', wipeitemNewS); deleteitemNew(jNode, $(comURL).find("a")[0].href); }); this.addEventListener('yt-navigate-finish', function wipeitemNewF() { this.removeEventListener('yt-navigate-finish', wipeitemNewF); deleteitemNew(jNode, $(comURL).find("a")[0].href); }); } function recheckNew(jNode) { var checkre = $(jNode).find("#checksp")[0]; if (typeof checkre !== 'undefined') { if ($(checkre).attr('data-chan') !== $(jNode).find("a#author-text")[0].href) { $(jNode).find("#checksp").remove(); $(jNode).find("#t30sp").remove(); $(jNode).find("#botmark").remove(); var cNode = $(jNode).parent().parent().find("#content-text"); $(cNode).parent().removeAttr('style'); $(cNode).removeAttr('style'); $(jNode).find("ytd-toggle-button-renderer.ytd-comment-action-buttons-renderer:eq(1)").removeAttr('style'); parseitemNew(jNode); } } } function deleteitemNew(jNode, url) { if (url.length > 74) { $(jNode).parent().parent().remove(); } else { $(jNode).parent().parent().parent().remove(); } } function sendinfo() { var answer = confirm('Будет запущен Telegram.' + '\n\nПрисоединитесь к группе, отправьте ссылку на подозрительный' + '\nкомментарий (можно скопировать из даты публикации) и обоснуйте подозрения.\n\nПерейти к группе?'); if (answer) { window.open(reporturl); } } function listpadd(jNode, response, url) { window.tempHTML = document.createElement('html'); tempHTML.innerHTML = response; window.aboutSTAT = tempHTML.getElementsByClassName('about-stat'); var day = Dparse(aboutSTAT[aboutSTAT.length - 1].innerHTML); $('textarea#listpersonal')[0].value += url.substring(0, url.length - 6).split('/').pop() + '=' + day + '\n'; var tempArray = $('textarea#listpersonal')[0].value.split('\n'); var uniqArray = tempArray.reduce(function(a,b){ if (a.indexOf(b) < 0) a.push(b); return a; },[]); $('textarea#listpersonal')[0].value = uniqArray.join('\n'); GM_config.set('listp1', uniqArray.join('\n')); GM_config.save(); arrayListP1 = GM_config.get('listp1').match(/[^\r\n=]+/g); $(jNode).find("#listpadd").html('\u274C'); $(jNode).find("#listpadd")[0].title = 'Удалить из закладок'; markpersonal(jNode, day); console.log("[MetaBot for Youtube] Bookmarks (personal list) updated."); } function listpaddNew(jNode, response, url) { var matches = regexdate.exec(response); var day = Dparse(matches[3]); $('textarea#listpersonal')[0].value += url.substring(0, url.length - 6).split('/').pop() + '=' + day + '\n'; var tempArray = $('textarea#listpersonal')[0].value.split('\n'); var uniqArray = tempArray.reduce(function(a,b){ if (a.indexOf(b) < 0) a.push(b); return a; },[]); $('textarea#listpersonal')[0].value = uniqArray.join('\n'); GM_config.set('listp1', uniqArray.join('\n')); GM_config.save(); arrayListP1 = GM_config.get('listp1').match(/[^\r\n=]+/g); $(jNode).find("#listpadd").html('\u274C'); $(jNode).find("#listpadd")[0].title = 'Удалить из закладок'; markpersonalNew($(jNode).parent(), day); console.log("[MetaBot for Youtube] Bookmarks (personal list) updated."); } function listpdel(jNode) { $(jNode).find("span#bookmark").remove(); var tempArray = $('textarea#listpersonal')[0].value.split('\n'); var itemDel = arrayListP1.indexOf($(jNode).find("a")[0].href.split('/').pop()); tempArray.splice(itemDel / 2,1); $('textarea#listpersonal')[0].value = tempArray.join('\n'); GM_config.set('listp1', tempArray.join('\n')); GM_config.save(); arrayListP1 = GM_config.get('listp1').match(/[^\r\n=]+/g); $(jNode).next().css({ "background-image": "none", "border-right": "", "padding-right": "" }); console.log("[MetaBot for Youtube] Bookmarks (personal list) updated."); } function listpdelNew(jNode) { $(jNode).find("span#bookmark").remove(); var tempArray = $('textarea#listpersonal')[0].value.split('\n'); var itemDel = arrayListP1.indexOf($(jNode).find("a")[0].href.split('/').pop()); tempArray.splice(itemDel / 2,1); $('textarea#listpersonal')[0].value = tempArray.join('\n'); GM_config.set('listp1', tempArray.join('\n')); GM_config.save(); arrayListP1 = GM_config.get('listp1').match(/[^\r\n=]+/g); $(jNode).parent().parent().find("#content-text").parent().css({ "background-image": "none", "border-right": "", "padding-right": "" }); console.log("[MetaBot for Youtube] Bookmarks (personal list) updated."); } function checkdate(jNode) { if (['en', 'en-US', 'en-GB', 'ru', 'uk', 'be', 'bg'].indexOf(currentlang()) < 0) { alert('Функция поддерживается только на языках:\n \u2714 English\n \u2714 Русский\n \u2714 Українська\n \u2714 Беларуская \u2714 Български\nВы можете сменить язык интерфейса в меню настроек YouTube.'); return; } $(jNode).find("img")[0].remove(); getpage(procdate, jNode, $(jNode).find("a")[0].href + '/about'); } function checkdateMob(jNode) { var channelURL = $(jNode).find("a")[0].href + '/about?ajax=1'; var request = new XMLHttpRequest(); request.onreadystatechange = function() { if (request.readyState === 4) { if (request.status === 200) { var response = request.responseText; if (response !== "") { console.log("[MetaBot for Youtube] XMLHttpRequest done."); var matches = regexdatemob.exec(response); var testday = Dparse(decodeURIComponent(JSON.parse('"' + matches[3] + '"'))); $(jNode).parent().find("div.erb").find("a")[0].innerHTML = $(jNode).parent().find("div.erb").find("a")[0].innerHTML + ' <img src="' + minf + '" title="Дата регистрации:" /> ' + testday; $(jNode).parent().find("div.zqb").css({ "background": "rgba(170,170,170,0.3)", "border-left": "3px solid rgba(170,170,170,0.3)", "padding-left": "3px" }); } else { console.log("[MetaBot for Youtube] XMLHttpRequest failed."); } } } }; request.open("GET", channelURL, true); request.send(null); } function checkdateNew(jNode) { if (['en', 'en-US', 'en-GB', 'ru', 'uk', 'be', 'bg'].indexOf(currentlang()) < 0) { alert('Функция поддерживается только на языках:\n \u2714 English\n \u2714 Русский\n \u2714 Українська\n \u2714 Беларуская \u2714 Български\nВы можете сменить язык интерфейса в меню настроек YouTube.'); return; } $(jNode).find("#checkbtn")[0].remove(); var userID = $(jNode).find("a")[0].href.split('/').pop(); var foundID = arrayERKY.indexOf(userID); if (foundID > -1) { console.log("[MetaBot for Youtube] user found in ERKY-db: " + userID); markredNew(jNode, arrayERKY[foundID + 1]); } else { getpage(procdateNew, jNode, $(jNode).find("a")[0].href + '/about'); } } function procdate(jNode, response, url) { window.tempHTML = document.createElement('html'); tempHTML.innerHTML = response; window.aboutSTAT = tempHTML.getElementsByClassName('about-stat'); var testday = Dparse(aboutSTAT[aboutSTAT.length - 1].innerHTML); var newspan = document.createElement('span'); newspan.id = 'botmark'; newspan.innerHTML = ' <img src="' + minf + '" title="Дата регистрации:" /> ' + testday; $(jNode).find("a.comment-author-text").after(newspan); $(jNode).next().css({ "background": "rgba(170,170,170,0.3)", "border-left": "3px solid rgba(170,170,170,0.3)", "padding-left": "3px" }); delete window.aboutSTAT; delete window.tempHTML; } function procdateNew(jNode, response, url) { var matches = regexdate.exec(response); var testday = Dparse(matches[3]); var aNode = $(jNode).find("#author-text")[0]; var cNode = $(jNode).parent().find("#content-text")[0]; var newspan = document.createElement('span'); newspan.id = 'botmark'; var checkBadge = $(aNode).parent().find('span#author-comment-badge')[0]; newspan.innerHTML = '<img src="' + minf + '" title="Дата регистрации:" /> ' + testday; $(aNode).append(newspan); if ($(checkBadge).length > 0) { $(checkBadge).attr('hidden', ''); $(aNode).removeAttr('hidden'); } $(cNode).parent().css({ "background": "rgba(170,170,170,0.3)", "border-left": "3px solid rgba(170,170,170,0.3)", "padding-left": "3px" }); aNode = $(jNode).find("#checksp"); aNode.attr('data-chan', $(jNode).find("a#author-text")[0].href); aNode.hide(); } function markred(jNode, day) { var newspan = document.createElement('span'); newspan.id = 'botmark'; newspan.innerHTML = ' <img src="' + mred + '" title="- пользователь найден в #ЕРКЮ, дата регистрации -" /> ' + day; $(jNode).find("a.comment-author-text").after(newspan); $(jNode).next().css({ "background": "rgba(255,50,50,0.3)", "border-left": "3px solid rgba(255,50,50,0.3)", "padding-left": "3px" }); if (GM_config.get('option2') === true) { requestDislike(jNode, false); } } function markredMob(jNode, day) { $(jNode).parent().find("div.erb").find("a")[0].innerHTML = $(jNode).parent().find("div.erb").find("a")[0].innerHTML + ' <img src="' + mred + '" title="Пользователь найден в ЕРКЮ" /> ' + day; $(jNode).parent().find("div.zqb").css({ "background": "rgba(255,50,50,0.3)", "border-left": "3px solid rgba(255,50,50,0.3)", "padding-left": "3px" }); } function markredNew(jNode, day) { var aNode = $(jNode).find("#author-text")[0]; var cNode = $(jNode).parent().find("#content-text")[0]; var newspan = document.createElement('span'); newspan.id = 'botmark'; newspan.innerHTML = '<img src="' + mred + '" title="- найден в #ЕРКЮ, дата регистрации -" /> ' + day; $(aNode).append(newspan); var checkBadge = $(aNode).parent().find('span#author-comment-badge')[0]; if ($(checkBadge).length > 0) { $(checkBadge).attr('hidden', ''); $(aNode).removeAttr('hidden'); } $(cNode).parent().css({ "background": "rgba(255,50,50,0.3)", "border-left": "3px solid rgba(255,50,50,0.3)", "padding-left": "3px" }); if (GM_config.get('option2') === true) { requestDislike(jNode, true); } } function markcustom(jNode, day, list) { switch (list) { case 1: var listname = Aparse(arrayListC1[0]); break case 2: var listname = Aparse(arrayListC2[0]); break case 3: var listname = Aparse(arrayListC3[0]); } var botmark = $(jNode).find("#botmark"); var rgbCustom = gmColor('colorc' + list, 1) + "," + gmColor('colorc' + list, 2) + "," + gmColor('colorc' + list, 3); var marktxt = ' <span style="' + iconstyledef + ' color: rgb(' + rgbCustom + '); font-size: 1.3em;" title="Найден в списке ' + listname + '">' + iconsdef[list] + '</span> '; if (botmark.length > 0) { $(botmark).prepend(marktxt); } else { $(jNode).find("#checkbtn")[0].remove(); var newspan = document.createElement('span'); newspan.id = 'botmark'; newspan.innerHTML = marktxt + day; $(jNode).find("a.comment-author-text").after(newspan); $(jNode).next().css({ "background": "rgba(" + rgbCustom + ",.3)", "border-left": "3px solid rgba(" + rgbCustom + ",0.3)", "padding-left": "3px" }); } } function markcustomNew(jNode, day, list) { switch (list) { case 1: var listname = Aparse(arrayListC1[0]); break case 2: var listname = Aparse(arrayListC2[0]); break case 3: var listname = Aparse(arrayListC3[0]); } var aNode = $(jNode).find("#author-text")[0]; var cNode = $(jNode).parent().find("#content-text")[0]; var checkBadge = $(aNode).parent().find('span#author-comment-badge')[0]; var botmark = $(cNode).parent().parent().parent().find("#botmark"); var rgbCustom = gmColor('colorc' + list, 1) + "," + gmColor('colorc' + list, 2) + "," + gmColor('colorc' + list, 3); var marktxt = '<span style="' + iconstyledef + ' color: rgb(' + rgbCustom + '); font-size: 1.3em;" title="Найден в списке ' + listname + '">' + iconsdef[list] + '</span> '; if (botmark.length > 0) { $(botmark).prepend(marktxt); } else { $(jNode).find("#checkbtn")[0].remove(); var newspan = document.createElement('span'); newspan.id = 'botmark'; newspan.innerHTML = marktxt + day; $(aNode).append(newspan); if ($(checkBadge).length > 0) { $(checkBadge).attr('hidden', ''); $(aNode).removeAttr('hidden'); } $(cNode).parent().css({ "background": "rgba(" + rgbCustom + ",.3)", "border-left": "3px solid rgba(" + rgbCustom + ",0.3)", "padding-left": "3px" }); } } function markpersonal(jNode, day) { $(jNode).find("#listpadd").html('\u274C'); $(jNode).find("#listpadd")[0].title = 'Удалить из закладок'; var botmark = $(jNode).parent().find("#botmark"); var rgbCustom = gmColor('colorp1', 1) + "," + gmColor('colorp1', 2) + "," + gmColor('colorp1', 3); var marktxt = ' <span id="bookmark" style="' + iconstyledef + ' color: rgb(' + rgbCustom + '); font-size: 1.3em;" title="Добавлен в закладки">' + iconsdef[0] + '</span> '; if (botmark.length > 0) { $(botmark).prepend(marktxt); $(jNode).next().css({ "background-image": "linear-gradient(230deg, rgba(" + rgbCustom + ",.4) 20%, rgba(0,0,0,0) 30%)" }); } else { var newspan = document.createElement('span'); newspan.id = 'botmark'; newspan.innerHTML = marktxt + day; $(jNode).find("a.comment-author-text").after(newspan); $(jNode).next().css({ "background": "linear-gradient(230deg, rgba(" + rgbCustom + ",.4) 20%, rgba(0,0,0,0) 30%)" }); } $(jNode).next().css({ "background-origin": "border-box", "border-right": "3px solid rgba(" + rgbCustom + ",.3)", "padding-right": "3px" }); } function markpersonalNew(jNode, day) { $(jNode).find("#listpadd").html('\u274C'); $(jNode).find("#listpadd")[0].title = 'Удалить из закладок'; var aNode = $(jNode).find("#author-text")[0]; var cNode = $(jNode).parent().find("#content-text")[0]; var checkBadge = $(aNode).parent().find('span#author-comment-badge')[0]; var botmark = $(cNode).parent().parent().parent().find("#botmark"); var rgbCustom = gmColor('colorp1', 1) + "," + gmColor('colorp1', 2) + "," + gmColor('colorp1', 3); var marktxt = '<span id="bookmark" style="' + iconstyledef + ' color: rgb(' + rgbCustom + '); font-size: 1.3em;" title="Добавлен в закладки">' + iconsdef[0] + '</span> '; if (botmark.length > 0) { $(botmark).prepend(marktxt); $(cNode).parent().css({ "background-image": "linear-gradient(230deg, rgba(" + rgbCustom + ",.4) 20%, rgba(0,0,0,0) 30%)" }); } else { var newspan = document.createElement('span'); newspan.id = 'botmark'; newspan.innerHTML = marktxt + day; $(aNode).append(newspan); if ($(checkBadge).length > 0) { $(checkBadge).attr('hidden', ''); $(aNode).removeAttr('hidden'); } $(cNode).parent().css({ "background": "linear-gradient(230deg, rgba(" + rgbCustom + ",.4) 20%, rgba(0,0,0,0) 30%)" }); } $(cNode).parent().css({ "background-origin": "border-box", "border-right": "3px solid rgba(" + rgbCustom + ",.3)", "padding-right": "3px" }); } function gmColor(gmVar, colpos) { return parseInt(parseColor(GM_config.get(gmVar), false).slice(colpos*2-1, colpos*2+1), 16) } function requestDislike(jNode, isNew) { var element; if (isNew) { element = $(jNode).parent().find("ytd-toggle-button-renderer.ytd-comment-action-buttons-renderer:not(.style-default-active)")[1]; } else { element = $(jNode).parent().find(".yt-uix-button.comment-action-buttons-renderer-thumb[aria-checked='false']")[1]; } if (element) orderedClicksArray.push(element); if (bDTaskSet == 0) { bDTaskSet = 1; setTimeout(scheduledDislike, minDCTime + Math.random() * (maxDCTime - minDCTime), isNew); } } function scheduledDislike(isNew) { if ( bDBlur || document.querySelector('paper-dialog.ytd-popup-container:not([style*="display:none"]):not([style*="display: none"])') || document.querySelector('div.yt-dialog-fg-content.yt-dialog-show-content') ) { setTimeout(scheduledDislike, minDCTime + Math.random() * (maxDCTime - minDCTime), isNew); } else { if (orderedClicksArray.length) { var element = orderedClicksArray.shift(); if ( (isNew && !(element.classList.contains("style-default-active"))) || (element.getAttribute("aria-checked") == "false") ) { $(element).css({"background": "rgba(255,50,50,0.3)"}); if (isNew) {$(element).css({"border-radius": "50%"});} element.click(); } else { setTimeout(scheduledDislike, 100, isNew); return; } setTimeout(scheduledDislike, minDCTime + Math.random() * (maxDCTime - minDCTime), isNew); } else { bDTaskSet = 0; } } } function Dparse(day) { day = day.replace(/Joined |Дата регистрации: |Ви приєдналися |Член от |Далучыўся(-лася) /i, ''); day = day.replace(/ янв\. | января | січ\. |\.01\./i, ' Jan, '); day = day.replace(/ февр\. | февраля | лют\. |\.02\./i, ' Feb, '); day = day.replace(/ мар\. | марта | бер\. |\.03\./i, ' Mar, '); day = day.replace(/ апр\. | апреля | квіт\. |\.04\./i, ' Apr, '); day = day.replace(/ мая\. | мая | трав\. |\.05\./i, ' May, '); day = day.replace(/ июн\. | июня | черв\.|\.06\./i, ' Jun, '); day = day.replace(/ июл\. | июля | лип\. |\.07\./i, ' Jul, '); day = day.replace(/ авг\. | августа | серп\. |\.08\./i, ' Aug, '); day = day.replace(/ сент\. | сентября | вер\. |\.09\./i, ' Sep, '); day = day.replace(/ окт\. | октября | жовт\. |\.10\./i, ' Oct, '); day = day.replace(/ нояб\. | ноября | лист\. |\.11\./i, ' Nov, '); day = day.replace(/ дек\. | декабря | груд\. |\.12\./i, ' Dec, '); day = day.replace(/ г\.| р\./i, ''); return day; } function Aparse(text) { if (ytmode === 1) { var isNew = true; } else { var isNew = false; } text = text.replace(/&/g, '&'); text = text.replace(/</g, '<'); text = text.replace(/>/g, '>'); text = text.replace(/\r\n/g, '<br>'); if (isNew) { text = text.replace(/\[(.+?)\]\((.+?)\)/g, '<a href="$2" target="_blank" style="color:rgba(39,147,230,1);">$1</a>'); } else { text = text.replace(/\[(.+?)\]\((.+?)\)/g, '<a href="$2" target="_blank">$1</a>'); } text = text.replace(/\*\*(.*?)\*\*/g, '<b>$1</b>'); text = text.replace(/\*(.*?)\*/g, '<i>$1</i>'); text = text.replace(/__(.*?)__/g, '<u>$1</u>'); return text; } function currentlang() { return regexlang.exec(document.body.innerHTML)[1]; } function currentlangmob() { return document.documentElement.lang; } function getURLParameter(name, link) { return decodeURIComponent((new RegExp('[?|&]' + name + '=([^&;]+?)(&|#|;|$)').exec(link) || [null, ''])[1].replace(/\+/g, '%20')) || null; } function ytOldDesign() { var getDesignCookie = function (cookie) { var prefs = cookie.split("; ").filter(function (v) { return v.indexOf("PREF=") === 0; })[0]; if (!prefs) { return "PREF=f6=8"; } var entries = prefs.substr(5).split('&'); var set = false; for (var i = 0; i < entries.length; i++) { if (entries[i].indexOf("f6=") === 0) { set = true; entries[i] = "f6=8"; } } if (!set) { entries.push("f6=8"); } return "PREF=" + entries.join('&'); }; document.cookie = getDesignCookie(document.cookie) + ";domain=.youtube.com;path=/"; } function ytNewDesign() { var requestSw = new XMLHttpRequest(); requestSw.open("POST", "https://www.youtube.com/new?optin=true", true); requestSw.send(null); } function parseColor(color, toNumber) { if (toNumber === true) { if (typeof color === 'number') { return (color | 0); } if (typeof color === 'string' && color[0] === '#') { color = color.slice(1); } return parseInt(color, 16); } else { color = '#' + ('00000' + (color | 0).toString(16)).substr(-6); return color; } } $(window).focus(function() { bDBlur = 0; }); $(window).blur(function() { bDBlur = 1; }); function getpage(callback, jNode, url) { var request = new XMLHttpRequest(); request.onreadystatechange = function() { if (request.readyState === 4) { if (request.status === 200) { if (request.responseText !== "") { console.log("[MetaBot for Youtube] XMLHttpRequest done: " + url); callback(jNode, request.responseText, url); } } } }; request.open("GET", url, true); request.send(null); } function getlist(callback, numArr, url) { if (typeof GM_xmlhttpRequest !== 'undefined') { GM_xmlhttpRequest({ method: "GET", url: url, onload: function(response) { callback(numArr, response.responseText, response.status, url); } }); } else if (typeof GM !== 'undefined') { GM.xmlHttpRequest({ method: "GET", url: url, onload: function(response) { callback(numArr, response.responseText, response.status, url); } }); } else { console.log("[MetaBot for Youtube] Unable to get supported cross-origin XMLHttpRequest function."); } } function waitForKeyElements(selectorTxt, actionFunction, bWaitOnce, iframeSelector) { var targetNodes, btargetsFound; if (typeof iframeSelector == "undefined") targetNodes = $(selectorTxt); else targetNodes = $(iframeSelector).contents().find(selectorTxt); if (targetNodes && targetNodes.length > 0) { btargetsFound = true; targetNodes.each(function() { var jThis = $(this); var alreadyFound = jThis.data('alreadyFound') || false; if (!alreadyFound) { var cancelFound = actionFunction(jThis); if (cancelFound) btargetsFound = false; else jThis.data('alreadyFound', true); } }); } else { btargetsFound = false; } var controlObj = waitForKeyElements.controlObj || {}; var controlKey = selectorTxt.replace(/[^\w]/g, "_"); var timeControl = controlObj[controlKey]; if (btargetsFound && bWaitOnce && timeControl) { clearInterval(timeControl); delete controlObj[controlKey]; } else { if (!timeControl) { timeControl = setInterval(function() { waitForKeyElements(selectorTxt, actionFunction, bWaitOnce, iframeSelector); }, 300); controlObj[controlKey] = timeControl; } } waitForKeyElements.controlObj = controlObj; }
frankmalcolmkembery / GNU GENERAL PUBLIC LICENSE Version 3 29 June 2007 CopyGNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. {one line to give the program's name and a brief idea of what it does.} Copyright (C) {year} {name of author} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: {project} Copyright (C) {year} {fullname} This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
Noykarde / NoykardeRepositoryGNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. {one line to give the program's name and a brief idea of what it does.} Copyright (C) {year} {name of author} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: {project} Copyright (C) {year} {fullname} This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
minecraft77 / Blk StealthspiderGNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.