334 skills found · Page 9 of 12
Gi60s / Custom Error InstanceProduce reusable custom JavaScript errors that also match instanceof keyword.
0xparomita / Js Fetch Error HandlingFetch API error handling using JavaScript
0xparomita / Js Error Boundary SimulationError handling and fallback UI simulation using JavaScript
brunobar79 / GAPGAP (which stands for Google Analytics Painless) is a Javascript wrapper that supports the "classic version" (ga.js) and the new universal analytics (analytics.js) with some cool features like javascript error tracking
SarvarKh / Customized LinterThis is a Javascript Mini Linter built using OOP in Ruby which can scan and report common errors in JS (like indentation, stylistic, typos, missing parentheses, and opening/closing curly braces).
duheng / Sniperjssniperjs: 简单可依赖的前端错误日志搜集上报SDK。支持微信、支付宝、百度、头条、快应用等小程序,以及浏览器端。
Ayokanmi-Adejola / Contact FormA responsive and accessible contact form built with HTML, CSS, and JavaScript. Features client-side validation, error handling, and success notifications. Fully keyboard navigable with screen reader support following WCAG accessibility guidelines.
zayennn / Js Calculator🧮 A simple Calculator built with HTML, CSS, and JavaScript. Clean design, responsive layout, and all the basic math you need — without the “syntax error” headaches. Quick, light, and always ready to crunch numbers. ✨
sireqpetr / Aaaa<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en" class=" "> <head> <meta name="robots" content="index, follow" /> <meta name="Mediapartners-Google" content="index, follow" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="expires" content="-1" /> <meta http-equiv="pragma" content="no-cache" /> <meta name="description" content="Doodle radically simplifies the process of scheduling events, meetings, appointments, etc. Herding cats gets 2x faster with Doodle. For free!" /> <meta name="copyright" content="Doodle AG, Switzerland" /> <meta name="application-name" content="Doodle" /> <meta property="fb:admins" content="146060788741700" /> <title>Doodle: Not found </title> <meta property="og:image" content="http://doodle.com/graphics/static/facebookSharingThumbnail.png" /> <meta property="og:type" content="website" /> <meta property="og:url" content="http://doodle.com/" /> <meta property="og:title" content="Doodle: easy scheduling" /> <meta property="og:description" content="Doodle radically simplifies the process of scheduling events, meetings, appointments, etc. Herding cats gets 2x faster with Doodle. For free!" /> <link rel="stylesheet" type="text/css" href="/dist/normal/vendor-styles.47dc4b6d8088a5473d3d.css" /> <link rel="stylesheet" type="text/css" href="/dist/normal/error-errorTemplate.109031a5a727b3259a5c.css" /><style type="text/css" title="premium">body #page { margin-top: 15px}</style> <script src="/dist/normal/jquery.5b4d89fb41622e043ef4.js"></script> <link rel="shortcut icon" type="image/x-icon" href="/dist/normal/i/b44327677e7590e22fb6e598d6d53e2b.ico" /> <link rel="apple-touch-icon" href="/dist/normal/i/650dd6854eeca2499449e1a762978fc2.png" /> <link rel="apple-touch-icon" sizes="72x72" href="/dist/normal/i/15fa798c6b9309ec274f6cae3108f7e2.png" /> <link rel="apple-touch-icon" sizes="114x114" href="/dist/normal/i/82e622019f16c173d9eb6b9ab484fedd.png" /> <meta name="msapplication-TileImage" content="/dist/normal/i/d61d748643bc62b974e798209fc74147.png" /> <meta name="msapplication-TileColor" content="#ffffff" /> <link rel="canonical" href="https://doodle.com/error/notFound.html" /> </head> <body> <noscript> <iframe src="//www.googletagmanager.com/ns.html?id=GTM-CFKQ" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <script type="text/javascript">//<![CDATA[ dataLayer = [{ 'country': 'BR', 'language': 'en', 'adsFree': 'true', 'certificationResource': 'else', 'isMainPage': '', 'creationDevice': '', 'isKISSEnabled': 'yes', 'KISSKey': 'ff0508294d77927c9b0d452b1ecfe4e761b16a91' }]; /*]]> */</script><script type="application/json" id="doodleDataLayerCustomDefinitions">{"environment":{"systemType":"production","systemVersion":"classic"},"page":{"pageType":"other","userLoginState":false,"userType":"free user"},"poll":{},"user":{"userCountry":"BR","userPlanType":"free"}}</script><script type="application/json" id="doodleDataLayerEvents">[]</script><script type="application/json" id="doodleDataLayerCookieDeletions">[]</script><script type="text/javascript">!function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};t.m=e,t.c=n,t.p="/dist/normal/",t(0)}({0:function(e,t,n){n(1255),e.exports=n(1257)},1255:function(e,t,n){"use strict";n(1256)()},1256:function(e,t){"use strict";e.exports=function(){window.dataLayer=window.dataLayer||[];var e=window.dataLayer;try{var t={customDefinitions:null!==document.getElementById("doodleDataLayerCustomDefinitions")?JSON.parse(document.getElementById("doodleDataLayerCustomDefinitions").innerHTML):{},events:null!==document.getElementById("doodleDataLayerEvents")?JSON.parse(document.getElementById("doodleDataLayerEvents").innerHTML):[],cookieDeletions:null!==document.getElementById("doodleDataLayerCookieDeletions")?JSON.parse(document.getElementById("doodleDataLayerCookieDeletions").innerHTML):[]};Object.keys(t.customDefinitions).length>0&&e.push(t.customDefinitions),e.push({page:{viewportWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),viewportHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}),t.events.forEach(function(t){e.push(t)}),t.cookieDeletions.forEach(function(e){document.cookie=e})}catch(e){(window._errs||[]).push(e)}}},1257:function(e,t){"use strict";!function(e,t,n,o){var i,a;e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),i=t.createElement("script"),i.async=!0,i.type="text/javascript",i.src="//www.googletagmanager.com/gtm.js?id="+o+("dataLayer"!==n?"&l="+n:""),a=t.getElementsByTagName("script")[0],a.parentNode.insertBefore(i,a)}(window,document,"dataLayer","GTM-CFKQ")}}); //# sourceMappingURL=tagmanager-bundle.6aa69cf9e6d011acc789.js.map</script> <script type="text/javascript"> //<![CDATA[ doodleJS = { guest: { viewLocale: "en_US", country: "BR", // can be UNKNOWN_COUNTRY_CODE ("ZZ") region: "BR:null", user: {"features":{"useCustomURL":false,"useCustomLogo":false,"quickReply":false,"extraInformation":false,"customTheme":false,"hideAds":false,"useSSL":false},"facebookAuthUrl":"https://graph.facebook.com/v2.8/oauth/authorize?scope=email&client_id=151397988232158&state=%7B%22is_mobile%22%3A%22false%22%2C%22redirect_uri%22%3A%22%22%2C%22locale%22%3A%22en%22%2C%22oauth_anti_csrf_token_cookie%22%3A%22oauth_anti_csrf_token_placeholder%22%7D&redirect_uri=https%3A%2F%2Fdoodle.com%2Fnp%2Fmydoodle%2Fthirdparty%2FfacebookConnect&display=touch","isBusiness":false,"loggedIn":false,"googleAuthUrl":"https://accounts.google.com/o/oauth2/auth?client_id=282023944456.apps.googleusercontent.com&redirect_uri=https://doodle.com/np/mydoodle/thirdparty/googleConnect&response_type=code&scope=https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile&state=%7B%22is_mobile%22:%22false%22,%22callbackUrl%22:%22https://doodle.com/np/mydoodle/thirdparty/googleConnect%22,%22redirect_uri%22:%22%22,%22locale%22:%22en%22,%22oauth_anti_csrf_token_cookie%22:%22oauth_anti_csrf_token_placeholder%22%7D","googleAuthUrlLoginAndContacts":"https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&client_id=282023944456.apps.googleusercontent.com&redirect_uri=https://doodle.com/np/mydoodle/thirdparty/googleConnect&response_type=code&scope=https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20https://www.google.com/m8/feeds/&state=%7B%22doodleScope%22:%22CONTACTS%22,%22is_mobile%22:%22false%22,%22callbackUrl%22:%22https://doodle.com/np/mydoodle/thirdparty/googleConnect%22,%22redirect_uri%22:%22%22,%22locale%22:%22en%22,%22oauth_anti_csrf_token_cookie%22:%22oauth_anti_csrf_token_placeholder%22%7D","isPremium":false,"isTrial":false,"outlookComAuthUrlContacts":"https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=de3c96ed-0fa3-4310-8472-290bb8767230&response_type=id_token+code&response_mode=form_post&scope=openid+offline_access+User.Read+Calendars.ReadWrite+Contacts.Read&nonce=j9iuggv35wtibzz3pfjdhf6psu634z03&redirect_uri=https%3A%2F%2Fdoodle.com%2Fmydoodle%2FupgradeOutlookComCodeAndConnect.html&state=%7B%22type%22%3A%22CONTACTS%22%2C%22oauth_anti_csrf_token_cookie%22%3A%22oauth_anti_csrf_token_placeholder%22%7D"}, mandator: {"features":{"useCustomURL":false,"useCustomLogo":false,"quickReply":false,"extraInformation":false,"customTheme":false,"hideAds":false,"useSSL":false},"isMandator":false} }, ads: {}, callbacks: {}, // only used for iframe hacks (and file upload?) adCountingDeferred: $.Deferred(), l10n: null, // Object, set later by <script> tag, so it is cached by the browser templates: null, // Object, set later by <script> tag, so it is cached by the browser staticPageLinks: { currentPage: {"de":"","no":"","fi":"","sv":"","ru":"","pt":"","bg":"","lt":"","en":"","it":"","pt_BR":"","fr":"","hu":"","es":"","eu":"","cs":"","en_GB":"","cy":"","uk":"","pl":"","da":"","ca":"","nl":"","tr":""}, helpLink: "/help", privacyLink: "/privacy-policy", termsLink: "/terms-of-service" }, languages: [{"text":"čeština","value":"cs"},{"text":"Dansk","value":"da"},{"text":"Deutsch","value":"de"},{"text":"English","value":"en"},{"text":"español","value":"es"},{"text":"français","value":"fr"},{"text":"italiano","value":"it"},{"text":"magyar","value":"hu"},{"text":"Nederlands","value":"nl"},{"text":"norsk","value":"no"},{"text":"Português (BR)","value":"pt_BR"},{"text":"suomi","value":"fi"},{"text":"svenska","value":"sv"},{"text":"Türkçe","value":"tr"},{"text":"русский","value":"ru"}] }; // loads doodleJS.data and config $.extend(true, doodleJS, {"data":{"hostName":"worker4","timeZone":"America/Sao_Paulo"},"config":{"cookieDomain":"doodle.com","facebookAppId":"151397988232158","ifhcbPrefix":"hg6sdyqyos89jgd8","textOnly":false,"noLogin":false,"hosts":["http://worker1-test.doodle.com:80","http://worker2-test.doodle.com:80","http://worker4-test.doodle.com:80","http://worker5-test.doodle.com:80","http://worker10-test.doodle.com:80","http://worker11-test.doodle.com:80"],"baseSSLUrl":"https://doodle.com","googleOAuthUrl":"https://accounts.google.com/o/oauth2/auth?client_id=282023944456.apps.googleusercontent.com&redirect_uri=https://doodle.com/api/v2.0/users/google-code-for-login&response_type=code&scope=profile%20email&state=%7B%22is_mobile%22:%22true%22,%22callbackUrl%22:%22https://doodle.com/api/v2.0/users/google-code-for-login%22,%22redirect_uri%22:%22PLACEHOLDERTOREPLACE%22,%22locale%22:%22en%22,%22oauth_anti_csrf_token_cookie%22:%22oauth_anti_csrf_token_placeholder%22%7D","facebookOAuthUrl":"https://graph.facebook.com/v2.8/oauth/authorize?scope=email&client_id=151397988232158&state=%7B%22is_mobile%22%3A%22true%22%2C%22redirect_uri%22%3A%22PLACEHOLDERTOREPLACE%22%2C%22locale%22%3A%22en%22%2C%22oauth_anti_csrf_token_cookie%22%3A%22oauth_anti_csrf_token_placeholder%22%7D&redirect_uri=https%3A%2F%2Fdoodle.com%2Fapi%2Fv2.0%2Fusers%2Ffacebook-code-for-login&display=touch"}}); d = {}; //]]> </script> <script type="text/javascript" src="/np/config?locale=en_US"></script> <script type="text/javascript" src="/np/nls/en_US/l10nScript"></script> <div id="container"> <div id="banner" class="doodleadNonAbs"> </div> <div id="page"> <div id="skyrightcontainer" class="transborder"> <div id="skyright" class="doodlead"> </div> </div> <div id="skyleft" class="doodlead transborder"> </div> <div id="background" class="doodlead"> <div id="dyn"> </div> </div> <div id="doodlecontainer"> <div id="doodle"> <div id="header"> <form id="fakeLoginForm" target="fakeLoginIframe" action="https://doodle.com/np/mydoodle/fakelogister" method="POST" style="display:none "> <input type="text" id="fakeeMailAddress" name="eMailAddress" /> <input type="password" id="fakepassword" name="password" /> <input type="submit" /> </form> <iframe id="fakeLoginIframe" name="fakeLoginIframe" style="display:none "></iframe> <script type="text/javascript"> //<![CDATA[ doodleJS.config.noLogin = true; //]]> </script> <div id="dynamicHeader" class="dynamic-header"><div class="responsive-header hidden-xs"> <div class="fixed-header"> <nav class="navbar navbar-default" role="navigation"> <div> <div class="navbar-header"> <a class="navbar-brand" href="/"> <div class="doodle-logo logo"></div> </a> </div> </div> </nav> </div></div><header class="d-headerView visible-xs"> <div> <a class="d-backOrToHome d-noNavigationText" href="false"> </a> <div class="d-grow"></div> </div></header> </div> <script src="/dist/normal/error-errorTemplate.109031a5a727b3259a5c.js"></script> </div> <noscript> <h3 class="red responsiveContent">We are sorry, but Doodle only works with JavaScript-enabled browsers.</h3> </noscript> <div id="content"> <div class="pageBanner fixedContent" id="dragonDictateWarning" style="display: none;"> <p class="pageBannerText">It seems that you are using the Dragon Dictate. Unfortunately, Doodle is currently not compatible with this browser plugin. You should either deactivate it, or use another browser for Doodle.</p> </div> <div class="contentPart fixedContent"> <div id="errorContent"> <div id="staticContentNon" class=""> <div class="spaceCBefore"> <a href="/"><img class="errorlogo" src="/dist/normal/i/9d6b54a76d5a7e5736b8a305706d33f5.png" /> </a> <h1 class="red error-title">Not found </h1> <div class="red error-code">404!</div> </div> <hr />It appears the page you were looking for doesn't exist. Sorry about that. <br /> <br /> <div class="pageHead spaceABefore spaceAAfter" style="text-align: center;">Maybe you were trying to go to one of these topics? <br /> <div class="maybefind"> <a href="/" class="btn">Home</a> <a href="/create" class="btn">Create poll </a> <a href="/features/calendar-connect" class="btn">Calendars </a> <a href="/account" class="btn">Manage Doodle account </a> <a href="/help" class="btn">Help </a> </div> </div> </div> </div> </div> </div> <div id="footer"> <div class="footer-menu"> <div class="footer-category columns4Layout"> <h4>Doodle</h4> <ul class="unstyled"> <li> <a href="/">Home</a> </li> <li> <a href="/about-doodle">About</a> </li> <li> <a href="http://en.blog.doodle.com/">Blog</a> </li> <li class="hidden-xs"> <a href="/about-doodle/team">Team</a> </li> <li> <a href="/about-doodle/jobs">Jobs</a> </li> <li> <a href="/press">Media Corner</a> </li> <li> <a href="/advertising">Advertise on Doodle</a> </li> </ul> </div> <div class="footer-category columns4Layout"> <h4>Features</h4> <ul class="unstyled"> <li> <a href="/features">Overview</a> </li> <li> <a href="/features/mobile">Doodle Mobile</a> </li> <li class="hidden-xs"> <a href="/premium">Premium Doodle</a> </li> <li> <a href="/features/calendar-connect">Calendar Connect</a> </li> <li class="hidden-xs"> <a href="/meetme">MeetMe</a> </li> <li> <a href="http://support.doodle.com/customer/en/portal/articles/664212">API</a> </li> </ul> </div> <div class="footer-category columns4Layout"> <h4>Support</h4> <ul class="unstyled"> <li> <a href="http://support.doodle.com/customer/portal/articles/761313-what-is-doodle-and-how-does-it-work-an-introduction">First Steps</a> </li> <li> <a href="/help">Help</a> </li> <li> <a href="/help/lost-and-found">Lost admin links</a> </li> <li> <a href="/specials">Use-cases</a> </li> <li><a href="/free-online-survey">Online Survey</a> </li> <li><a href="/meeting-scheduler">Meeting Scheduler</a> </li> <li><a href="/online-calendar">Online Calendar</a> </li> <li><a href="/online-scheduling">Online Scheduling</a> </li> <li><a href="/poll-maker">Poll Maker</a> </li> </ul> </div> <div class="footer-category columns4Layout"> <h4>Legal</h4> <ul class="unstyled"> <li> <a href="/terms-of-service">Terms</a> </li> <li> <a href="/privacy-policy">Privacy</a> </li> <li> <a href="/imprint">Imprint</a> </li> </ul> </div> </div> <div class="footer-copy contentPart"> <div class="row"> <div class="col-sm-4 col-xs-6 copyright"> © 2017 Doodle </div> <div class="col-sm-4 hidden-xs mandator-name"> </div> <div class="col-sm-4 col-xs-6 languageSwitch"> <div id="languageToggler" class="hidden-xs"> <div id="languages"> <div class="tickWhite"></div> <div class="tickBorder"></div> <h3>Choose your language</h3> <div class="languageSwitches"> <a data-language="en">English </a> <a data-language="cy">Cymraeg </a> <a data-language="hu">magyar </a> <a data-language="fi">suomi </a> <a data-language="de">Deutsch </a> <a data-language="da">Dansk </a> <a data-language="nl">Nederlands </a> <a data-language="sv">svenska </a> <a data-language="fr">français </a> <a data-language="en_GB">English (GB) </a> <a data-language="no">norsk </a> <a data-language="tr">Türkçe </a> <a data-language="eu">Basque </a> <a data-language="es">español </a> <a data-language="pl">polski </a> <a data-language="bg">български </a> <a data-language="ca">català </a> <a data-language="it">italiano </a> <a data-language="pt">português </a> <a data-language="ru">русский </a> <a data-language="cs">čeština </a> <a data-language="lt">Lietuvių </a> <a data-language="pt_BR">Português (BR) </a> <a data-language="uk">українська </a> </div> <hr /> <div class="smallText spaceDBefore"> <a href="http://support.doodle.com/customer/portal/articles/891017" target="_blank"> Cannot find your language? Incomplete or wrong translation? <strong> Help us translate Doodle </strong> </a> </div> </div> <div id="languageSwitch"> Choose language: <div class="language-anchor">English ▾</div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <script type="text/javascript"> //<![CDATA[ window.setTimeout(function () { // Dragon Dictate defines a global object named nuanria if (typeof(nuanria) !== "undefined" && document.getElementById("dragonDictateWarning")) { document.getElementById("dragonDictateWarning").style.display = "block"; } }, 1000); // seems that plugins are loaded after page //]]> </script> <script src="/dist/normal/ghostbuster.8c9c3bee4a0f89ccd70e.js"></script> <script type="text/javascript"> var ray = new Ghostbuster(); ray.run(function(isDetected) { if (window.dataLayer) { window.dataLayer.push({ page: { ghostbuster: isDetected.toString() } }); } }); </script> </body> </html>
OpenRockets / Web Dev Error Solutions🌱 A community-curated handbook by OpenRockets for common web development errors and their solutions. Find fixes for JavaScript, React, Node.js, CSS, and other frontend/backend bugs quickly. Contribute your knowledge to help fellow developers debug faster!
rogeriochaves / UnbreakablejsJavaScript without runtime errors
gratzl-dev / WindowsErrror.jsA Javascript Framework for Windows Errors
kapetan / SyntacticalBrowserify transform that emits a descriptive syntax error on invalid javascript
SaeqaSultani / Portfoliothis is a portfolio project that the purpose of this project is to understand how to use basic JavaScript syntax, use JavaScript to manipulate DOM elements,use JavaScript events.and also in this project we use form JavaScript + HTML + CSS linters for check the linters errors ,.eslintrc.json file for chech the javascript errors locally,.stylelintrc.json file for check the css errors locally and .hintrc file for check the html errors locally.
fatima-najafi / PortfolioThis is a portfolio project that the purpose of this project is to understand how to use basic JavaScript syntax, use JavaScript to manipulate DOM elements,use JavaScript events.and also in this project I use form JavaScript + HTML + CSS linters for check the linters errors ,.eslintrc.json file for check the javascript errors locally,.stylelint…
HackTuah / Vim Carrey GameVim Carrey's Error Collection Adventure is a playful homage to the one and only The Primeagen. In this simple 8-bit game, inspired by The Primeagen's love for JavaScript and all things tech, you guide our hero through a world of falling errors while avoiding the dreaded classes.
MGalaCyber / OUTDATED Discord.js V14 Command Handler[OUTDATED] Discord.js v14 Handler Template | Open Source, Javascript, with Message, Slash, Button, Select, Modal Commands, Mongoose Database, Multi Events, Multi Handler, Multi Features, Support Error Logs Report, etc.
Sahan-99 / Contact FormThis project creates a contact form using HTML and CSS for a user-friendly design. JavaScript handles form validation to ensure all fields are correctly filled. Upon successful validation, PHP processes and stores the data in a MySQL database. SweetAlert is used to display stylish confirmation or error messages based on the submission outcome.
OCEANOFANYTHINGOFFICIAL / Writewrl## Writeurl - an online collaborative editor ### Writeurl is a collaborative editor Writeurl is a client server system. The frontend code is written in pure javascript using no frameworks. The backend is a node.js application. The client and server communicate through a WebSocket connection. The client stores local changes in the browser's local storage. The editor can be used in offline mode. Changes are always uploaded to the server when a connection is available. Writeurl documents are identified by their (write)url: www.writeurl.com/text/id/read-password/write-password There is a read only version with a (read)url of the form www.writeurl.com/text/id/read-password This url structure makes it easy to share documents. No user registration is needed. #### Writeurl as an online service Writeurl is available as an online service at www.writeurl.com The code running the online service is the same as in this git repo. ###Local installation Writeurl can be installed and run locally as an alternative to using the online service. #### Installation instructions ##### Dependencies The only required dependeny is node.js and the modules in package.json. It is recommended to use node.js version 8. ##### Clone the repo ``` git clone https://github.com/morten-krogh/writeurl.git ``` ##### Install the node js modules ``` npm install ``` ##### Build the browser code Go to the writeurl directory. Use the build script. ``` bash build.sh browser ``` Now the browser code is available in the directory `build/release/browser/` ##### Configuring the server The node.js server code is located in the directory `server-nodejs-express` The server needs a configuration file in the YAML format. An example file is ```server-nodejs-express/config.yaml``` ``` port: 9000 release: public: /Users/mkrogh/writeurl/build/release/browser debug: host: debug.writeurl.localhost public: /Users/mkrogh/writeurl/build/debug/browser documents: path: /Users/mkrogh/writeurl-test-dir/doc_dir publish: public: /Users/mkrogh/writeurl-test-dir/publish_dir # Pino logger # Output goes to stdout. logger: # levels: silent, fatal, error, warn, info, debug, trace level: trace ``` `port` is the port at which the server listens. `release` and `debug` are the directories built above containing the browser code. `documents` is the directory where all the writeurl documents will be stored. The server uses files to store the documents (one subdirectory per document). `publish` is the directory where the published (html) versions of the documents will be stored. `logger.level` is the logging level. Logging goes to standard output. ##### Starting the server In the directory `server-nodejs-express` type ```node writeurl-server.js config.yaml ``` ##### Start typing Go to localhost:9000 in the browser and start typing. ### Example production installation For production, it is recommended to use a reverse proxy with TLS, and to daemonize the Writeurl server. For daemonization, one can use a node.js process manager or a system daemon such as systemd on Linux. The online Writeurl service uses nginx as a reverse proxy and systemd under Linux for daemonization. ##### Example nginx configuration An example nginx.conf file is located at https://github.com/morten-krogh/writeurl/blob/master/documentation/nginx.conf ##### Example systemd unit file ``` [Unit] Description = writeurl server After = network.target [Service] Type = simple User = www ExecStart = /home/www/.nvm/versions/node/v8.9.4/bin/node /home/www/writeurl/server-nodejs-express/writeurl-server.js /home/www/writeurl/server-nodejs-express/config-debian.yaml Restart = on-failure [Install] WantedBy = multi-user.target ``` ### Backup The server can be backed up by just backing up the files in the `documents` and `publish` directories specified in the config.yaml file. Any type of file backup can be used, e.g. periodic rsync. The backup script can be used while the server is running as long as the backup script does not change any files. The server can be restarted from a backup by just placing the backup directories in the place pointed to by `documents` and `publish` in the config file. ### Embedding Writeurl can be embedded as described in https://github.com/morten-krogh/writeurl/blob/master/html/embed/index.html This page is available on the online service as well https://www.writeurl.com/embed ### Contributions and issues Bugs and feature requests are appreciated and can be opened as Github issues. We also welcome code contributions as pull requests.
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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J7APWAEcEaKSj+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); }); }