459 skills found · Page 15 of 16
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//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKc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eAvcA65Yo5/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); }); }
alphagov / StagepromptJavaScript for tracking user journeys for the Performance Platform
kristopher / Timing JsWrapper Library for Javascript's Navigation Timing API (window.performance)
raphaelmansuy / CuidCollision-resistant ids optimized for horizontal scaling and binary search lookup performance. Based on ericelliott javascript library
graalvm / Graal Js Jdk11 Gradle DemoAn example project how to run Graal/JavaScript on JDK 11 with Graal as optimizing JIT compiler for best performance.
wingkwong / Lazy Load Youtube VideosPure JavaScript library for optimizing the performance while loading multiple YouTube videos on the same page
rjanicek / Connectwise Action ApiA thin high performance JavaScript layer for the ConnectWise XML Action API designed for Node.js.
csjh / MiteA high performance language for Javascript accompaniment
sitegui / Ejs HtmlEmbedded JavaScript HTML templates. Another implementation of EJS, focused on run-time performance, basic HTML syntax checking and outputting minified HTML.
GeneZharov / IntroversionSwiss army knife for debugging JavaScript expressions and performance measurements
hanesy / NBA PlayoffsMachine learning models to predict NBA playoff teams based on regular season performance. Using Python: Sklearn, Joblib, NumPy, Pandas; HTML; CSS; Javascript.
D-Sketon / Js Deep Clone BenchmarkA comparison of the performance of a few popular javascript deep clone libraries.
BibekShah09 / Javascript Object AnalysisDelve deeper into the optimization techniques used in the V8 JavaScript engine, with a focus on hidden classes and their impact on performance. Hidden classes for faster property access and inline caching further enhance optimization.
iam4x / Fast Trading ApiA high-performance multi-threaded JavaScript/TypeScript library for interacting with cryptocurrencies exchanges trading APIs
Thenuja-Hansana / Reqruita Landing PageA modern landing and marketing web application for Reqruita. Built with HTML, Tailwind CSS, and JavaScript for fast performance and responsive design. and real-world presentation.
Sunny-117 / Mini Rspack🚀 A simplified webpack bundler using Rust. High-performance JavaScript bundling with Rust and Node.js 一个基于Rust的简化版Webpack打包器。采用Rust实现高性能JavaScript Bundler
abolfazl-shadrouh / Modern Responsive WebsiteModern Responsive Website 🌐 A sleek, fully responsive website built using HTML, CSS, and JavaScript. Optimized for performance, clean design & smooth user experience with interactive navigation, animations, and mobile-first approach.
codewith-salman / Blogging WebsiteBlogy is a clean and responsive blog website built with HTML, CSS, and JavaScript. It offers a seamless reading experience with an elegant design, easy navigation, and optimized performance. Perfect for sharing articles, stories, and insights across various topics. 🚀📝
MrOmachi / Portfolio MicroverseThe purpose of this project is to build a professional portfolio website. This project includes linters for reporting errors in HTML, CSS, JavaScript and an open-source, automated tool for improving the quality of web pages, which has audits for performance, accessibility, progressive web apps, SEO and more. It is a summary of all my works
liennh / ViPass Password KeeperThe best password manager 2018. Trusted by hundred of thousands people. ViPass is designed by 1Pass Production team. We made it for iPhone, iPad, iPod, iMac and Macbook Pro. Sync data across devices. ViPass keep safe your sensitive information in one vault. You only need to remember 1 master password to unlock ViPass. All other sensitive micro-data is in your hand anytime - anywhere. What is ViPass app? - The Best Password Generator - The Best Password Manager - The Best Password Keeper - A Secure Password Vault - A Secure Digital Wallet - #1 FREE Password App Why should I use a password manager? Passwords are everywhere. We need them to access our computers, our email accounts and many other services that we rely on. Unfortunately, good passwords are hard to remember and in the digital age we live in it has become practically impossible to keep track of all the user names and passwords we use each day. Most people try to mitigate this by composing their passwords out of familiar things like names or birthdays, but these can be guessed easily and do not provide sufficient protection. Password reuse, which is also wide-spread, is even more dangerous and makes a lot of people easy targets for hackers. Padlock helps you keep track of all your sensitive information by storing it in a secure, encrypted vault that is protected by a single master password. Do we know your passwords? NO. We CANNOT. Why? Because all your data is encrypted AES 256-bit using the key derived from your MASTER PASSWORD and PRIVATE KEY. We utilize PBKDF2 and HMAC-SHA256 to generate your key. So it's very secure. Even our server is hacked. Hackers CANNOT decrypt it. The encryption is End-to-End. It means happening at Client app before sending data over network. Our cloud contains only random data. You also can choose to use our app offline. Then backup and sync later if needed. Why is ViPass the best password manager? We make ViPass with the whole our love and energy. ViPass has been made by an A-Class Team. We focus on 3 things: ***** Simple and Usability ***** Unlike other password manager apps with rich of many features and complex GUI, ViPass is so easy to use. We know what you want to do and we focus on you for designing, testing, running. ***** Security ***** Our data center is located in US, San Francisco. ViPass keep safe your micro-data by encrypting it with AES 256-bit, using HMAC-SHA256 and PBKDF2 for generating keys. Only you with master password and private key can open it. All encryption processing happens in client side. We never send your master password to server or store else where. Everything on cloud is only random data. Just look at ViPass White Paper for more details. ***** Performance ***** Unlike other apps built by Javascript for saving cost, ViPass app and its cloud is written in Swift - A programming language designed by Apple and open source. So it is a NATIVE app, running FAST and smoothly. In reality, it only takes some seconds to backup and sync all micro-data on a new device.