67 skills found · Page 2 of 3
gha-utilities / Sass BuildGitHub Action JavaScript wrapper runs Sass build with provided Inputs
Gabriel1231n2j3n / Hacks Para Krunker// ==UserScript== // @name aimbot gratis para krunker.io // @description Este es el mejor aimbot mod menuq puedas obtener // @version 2.19 // @author Gabriel - // @iconURL 31676a4e532e706e673f7261773d74727565.png // @match *://krunker.io/* // @exclude *://krunker.io/editor* // @exclude *://krunker.io/social* // @run-at document-start // @grant none // @noframes // ==/UserScript== /* eslint-env es6 */ /* eslint-disable no-caller, no-undef, no-loop-func */ var CRC2d = CanvasRenderingContext2D.prototype; var skid, skidStr = [...Array(8)].map(_ => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'[~~(Math.random()*52)]).join(''); class Skid { constructor() { skid = this; this.downKeys = new Set(); this.settings = null; this.vars = {}; this.playerMaps = []; this.skinCache = {}; this.inputFrame = 0; this.renderFrame = 0; this.fps = 0; this.lists = { renderESP: { off: "Off", walls: "Walls", twoD: "2d", full: "Full" }, renderChams: { off: "Off", white: "White", blue: "Blue", teal: "Teal", purple: "Purple", green: "Green", yellow: "Yellow", red: "Red", }, autoBhop: { off: "Off", autoJump: "Auto Jump", keyJump: "Key Jump", autoSlide: "Auto Slide", keySlide: "Key Slide" }, autoAim: { off: "Off", correction: "Aim Correction", assist: "Legit Aim Assist", easyassist: "Easy Aim Assist", silent: "Silent Aim", trigger: "Trigger Bot", quickScope: "Quick Scope" }, audioStreams: { off: 'Off', _2000s: 'General German/English', _HipHopRNB: 'Hip Hop / RNB', _Oldskool: 'Hip Hop Oldskool', _Country: 'Country', _Pop: 'Pop', _Dance: 'Dance', _Dubstep: 'DubStep', _Lowfi: 'LoFi HipHop', _Jazz: 'Jazz', _Oldies: 'Golden Oldies', _Club: 'Club', _Folk: 'Folk', _ClassicRock: 'Classic Rock', _Metal: 'Heavy Metal', _DeathMetal: 'Death Metal', _Classical: 'Classical', _Alternative: 'Alternative', }, } this.consts = { twoPI: Math.PI * 2, halfPI: Math.PI / 2, playerHeight: 11, cameraHeight: 1.5, headScale: 2, armScale: 1.3, armInset: 0.1, chestWidth: 2.6, hitBoxPad: 1, crouchDst: 3, recoilMlt: 0.3, nameOffset: 0.6, nameOffsetHat: 0.8, }; this.key = { frame: 0, delta: 1, xdir: 2, ydir: 3, moveDir: 4, shoot: 5, scope: 6, jump: 7, reload: 8, crouch: 9, weaponScroll: 10, weaponSwap: 11, moveLock: 12 }; this.css = { noTextShadows: `*, .button.small, .bigShadowT { text-shadow: none !important; }`, hideAdverts: `#aMerger, #endAMerger { display: none !important }`, hideSocials: `.headerBarRight > .verticalSeparator, .imageButton { display: none }`, cookieButton: `#onetrust-consent-sdk { display: none !important }`, newsHolder: `#newsHolder { display: none !important }`, }; this.isProxy = Symbol("isProxy"); this.spinTimer = 1800; let wait = setInterval(_ => { this.head = document.head||document.getElementsByTagName('head')[0] if (this.head) { clearInterval(wait); Object.entries(this.css).forEach(entry => { this.css[entry[0]] = this.createElement("style", entry[1]); }) this.onLoad(); } }, 100); } canStore() { return this.isDefined(Storage); } saveVal(name, val) { if (this.canStore()) localStorage.setItem("kro_utilities_"+name, val); } deleteVal(name) { if (this.canStore()) localStorage.removeItem("kro_utilities_"+name); } getSavedVal(name) { if (this.canStore()) return localStorage.getItem("kro_utilities_"+name); return null; } isType(item, type) { return typeof item === type; } isDefined(object) { return !this.isType(object, "undefined") && object !== null; } isNative(fn) { return (/^function\s*[a-z0-9_\$]*\s*\([^)]*\)\s*\{\s*\[native code\]\s*\}/i).test('' + fn) } getStatic(s, d) { return this.isDefined(s) ? s : d } crossDomain(url) { return "https://crossorigin.me/" + url; } async waitFor(test, timeout_ms = 20000, doWhile = null) { let sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); return new Promise(async (resolve, reject) => { if (typeof timeout_ms != "number") reject("Timeout argument not a number in waitFor(selector, timeout_ms)"); let result, freq = 100; while (result === undefined || result === false || result === null || result.length === 0) { if (doWhile && doWhile instanceof Function) doWhile(); if (timeout_ms % 1000 < freq) console.log("waiting for: ", test); if ((timeout_ms -= freq) < 0) { console.log( "Timeout : ", test ); resolve(false); return; } await sleep(freq); result = typeof test === "string" ? Function(test)() : test(); } console.log("Passed : ", test); resolve(result); }); }; createSettings() { this.settings = { //Rendering showSkidBtn: { pre: "<div class='setHed'>Rendering</div>", name: "Show Skid Button", val: true, html: () => this.generateSetting("checkbox", "showSkidBtn", this), set: (value, init) => { let button = document.getElementById("mainButton"); if (!button) { button = this.createButton("5k1D", "https://i.imgur.com/1tWAEJx.gif", this.toggleMenu, value) } else button.style.display = value ? "inherit" : "none"; } }, hideAdverts: { name: "Hide Advertisments", val: true, html: () => this.generateSetting("checkbox", "hideAdverts", this), set: (value, init) => { if (value) this.head.appendChild(this.css.hideAdverts) else if (!init) this.css.hideAdverts.remove() } }, hideStreams: { name: "Hide Streams", val: false, html: () => this.generateSetting("checkbox", "hideStreams", this), set: (value) => { window.streamContainer.style.display = value ? "none" : "inherit" } }, hideMerch: { name: "Hide Merch", val: false, html: () => this.generateSetting("checkbox", "hideMerch", this), set: value => { window.merchHolder.style.display = value ? "none" : "inherit" } }, hideNewsConsole: { name: "Hide News Console", val: false, html: () => this.generateSetting("checkbox", "hideNewsConsole", this), set: value => { window.newsHolder.style.display = value ? "none" : "inherit" } }, hideCookieButton: { name: "Hide Security Manage Button", val: false, html: () => this.generateSetting("checkbox", "hideCookieButton", this), set: value => { window['onetrust-consent-sdk'].style.display = value ? "none" : "inherit" } }, noTextShadows: { name: "Remove Text Shadows", val: false, html: () => this.generateSetting("checkbox", "noTextShadows", this), set: (value, init) => { if (value) this.head.appendChild(this.css.noTextShadows) else if (!init) this.css.noTextShadows.remove() } }, customCSS: { name: "Custom CSS", val: "", html: () => this.generateSetting("url", "customCSS", "URL to CSS file"), resources: { css: document.createElement("link") }, set: (value, init) => { if (value.startsWith("http")&&value.endsWith(".css")) { //let proxy = 'https://cors-anywhere.herokuapp.com/'; this.settings.customCSS.resources.css.href = value } if (init) { this.settings.customCSS.resources.css.rel = "stylesheet" try { this.head.appendChild(this.settings.customCSS.resources.css) } catch(e) { alert(e) this.settings.customCSS.resources.css = null } } } }, renderESP: { name: "Player ESP Type", val: "off", html: () => this.generateSetting("select", "renderESP", this.lists.renderESP), }, renderTracers: { name: "Player Tracers", val: false, html: () => this.generateSetting("checkbox", "renderTracers"), }, rainbowColor: { name: "Rainbow ESP", val: false, html: () => this.generateSetting("checkbox", "rainbowColor"), }, renderChams: { name: "Player Chams", val: "off", html: () => this.generateSetting( "select", "renderChams", this.lists.renderChams ), }, renderWireFrame: { name: "Player Wireframe", val: false, html: () => this.generateSetting("checkbox", "renderWireFrame"), }, customBillboard: { name: "Custom Billboard Text", val: "", html: () => this.generateSetting( "text", "customBillboard", "Custom Billboard Text" ), }, //Weapon autoReload: { pre: "<br><div class='setHed'>Weapon</div>", name: "Auto Reload", val: false, html: () => this.generateSetting("checkbox", "autoReload"), }, autoAim: { name: "Auto Aim Type", val: "off", html: () => this.generateSetting("select", "autoAim", this.lists.autoAim), }, frustrumCheck: { name: "Line of Sight Check", val: false, html: () => this.generateSetting("checkbox", "frustrumCheck"), }, wallPenetrate: { name: "Aim through Penetratables", val: false, html: () => this.generateSetting("checkbox", "wallPenetrate"), }, weaponZoom: { name: "Weapon Zoom", val: 1.0, min: 0, max: 50.0, step: 0.01, html: () => this.generateSetting("slider", "weaponZoom"), set: (value) => { if (this.renderer) this.renderer.adsFovMlt = value;} }, weaponTrails: { name: "Weapon Trails", val: false, html: () => this.generateSetting("checkbox", "weaponTrails"), set: (value) => { if (this.me) this.me.weapon.trail = value;} }, //Player autoBhop: { pre: "<br><div class='setHed'>Player</div>", name: "Auto Bhop Type", val: "off", html: () => this.generateSetting("select", "autoBhop", this.lists.autoBhop), }, thirdPerson: { name: "Third Person", val: false, html: () => this.generateSetting("checkbox", "thirdPerson"), set: (value, init) => { if (value) this.thirdPerson = 1; else if (!init) this.thirdPerson = undefined; } }, skinUnlock: { name: "Unlock Skins", val: false, html: () => this.generateSetting("checkbox", "skinUnlock", this), }, //GamePlay disableWpnSnd: { pre: "<br><div class='setHed'>GamePlay</div>", name: "Disable Players Weapon Sounds", val: false, html: () => this.generateSetting("checkbox", "disableWpnSnd", this), }, disableHckSnd: { name: "Disable Hacker Fart Sounds", val: false, html: () => this.generateSetting("checkbox", "disableHckSnd", this), }, autoActivateNuke: { name: "Auto Activate Nuke", val: false, html: () => this.generateSetting("checkbox", "autoActivateNuke", this), }, autoFindNew: { name: "New Lobby Finder", val: false, html: () => this.generateSetting("checkbox", "autoFindNew", this), }, autoClick: { name: "Auto Start Game", val: false, html: () => this.generateSetting("checkbox", "autoClick", this), }, inActivity: { name: "No InActivity Kick", val: true, html: () => this.generateSetting("checkbox", "autoClick", this), }, //Radio Stream Player playStream: { pre: "<br><div class='setHed'>Radio Stream Player</div>", name: "Stream Select", val: "off", html: () => this.generateSetting("select", "playStream", this.lists.audioStreams), set: (value) => { if (value == "off") { if ( this.settings.playStream.audio ) { this.settings.playStream.audio.pause(); this.settings.playStream.audio.currentTime = 0; this.settings.playStream.audio = null; } return; } let url = this.settings.playStream.urls[value]; if (!this.settings.playStream.audio) { this.settings.playStream.audio = new Audio(url); this.settings.playStream.audio.volume = this.settings.audioVolume.val||0.5 } else { this.settings.playStream.audio.src = url; } this.settings.playStream.audio.load(); this.settings.playStream.audio.play(); }, urls: { _2000s: 'http://0n-2000s.radionetz.de/0n-2000s.aac', _HipHopRNB: 'https://stream-mixtape-geo.ntslive.net/mixtape2', _Country: 'https://live.wostreaming.net/direct/wboc-waaifmmp3-ibc2', _Dance: 'http://streaming.radionomy.com/A-RADIO-TOP-40', _Pop: 'http://bigrradio.cdnstream1.com/5106_128', _Jazz: 'http://strm112.1.fm/ajazz_mobile_mp3', _Oldies: 'http://strm112.1.fm/60s_70s_mobile_mp3', _Club: 'http://strm112.1.fm/club_mobile_mp3', _Folk: 'https://freshgrass.streamguys1.com/irish-128mp3', _ClassicRock: 'http://1a-classicrock.radionetz.de/1a-classicrock.mp3', _Metal: 'http://streams.radiobob.de/metalcore/mp3-192', _DeathMetal: 'http://stream.laut.fm/beatdownx', _Classical: 'http://live-radio01.mediahubaustralia.com/FM2W/aac/', _Alternative: 'http://bigrradio.cdnstream1.com/5187_128', _Dubstep: 'http://streaming.radionomy.com/R1Dubstep?lang=en', _Lowfi: 'http://streams.fluxfm.de/Chillhop/mp3-256', _Oldskool: 'http://streams.90s90s.de/hiphop/mp3-128/', }, audio: null, }, audioVolume: { name: "Radio Volume", val: 0.5, min: 0, max: 1, step: 0.01, html: () => this.generateSetting("slider", "audioVolume"), set: (value) => { if (this.settings.playStream.audio) this.settings.playStream.audio.volume = value;} }, }; // Inject Html let waitForWindows = setInterval(_ => { if (window.windows) { const menu = window.windows[11]; menu.header = "Settings"; menu.gen = _ => { var tmpHTML = `<div style='text-align:center'> <a onclick='window.open("https://skidlamer.github.io/")' class='menuLink'>SkidFest Settings</center></a> <hr> </div>`; for (const key in this.settings) { if (this.settings[key].pre) tmpHTML += this.settings[key].pre; tmpHTML += "<div class='settName' id='" + key + "_div' style='display:" + (this.settings[key].hide ? 'none' : 'block') + "'>" + this.settings[key].name + " " + this.settings[key].html() + "</div>"; } tmpHTML += `<br><hr><a onclick='${skidStr}.resetSettings()' class='menuLink'>Reset Settings</a> | <a onclick='${skidStr}.saveScript()' class='menuLink'>Save GameScript</a>` return tmpHTML; }; clearInterval(waitForWindows); //this.createButton("5k1D", "https://i.imgur.com/1tWAEJx.gif", this.toggleMenu) } }, 100); // setupSettings for (const key in this.settings) { this.settings[key].def = this.settings[key].val; if (!this.settings[key].disabled) { let tmpVal = this.getSavedVal(key); this.settings[key].val = tmpVal !== null ? tmpVal : this.settings[key].val; if (this.settings[key].val == "false") this.settings[key].val = false; if (this.settings[key].val == "true") this.settings[key].val = true; if (this.settings[key].val == "undefined") this.settings[key].val = this.settings[key].def; if (this.settings[key].set) this.settings[key].set(this.settings[key].val, true); } } } generateSetting(type, name, extra) { switch (type) { case 'checkbox': return `<label class="switch"><input type="checkbox" onclick="${skidStr}.setSetting('${name}', this.checked)" ${this.settings[name].val ? 'checked' : ''}><span class="slider"></span></label>`; case 'slider': return `<span class='sliderVal' id='slid_utilities_${name}'>${this.settings[name].val}</span><div class='slidecontainer'><input type='range' min='${this.settings[name].min}' max='${this.settings[name].max}' step='${this.settings[name].step}' value='${this.settings[name].val}' class='sliderM' oninput="${skidStr}.setSetting('${name}', this.value)"></div>` case 'select': { let temp = `<select onchange="${skidStr}.setSetting(\x27${name}\x27, this.value)" class="inputGrey2">`; for (let option in extra) { temp += '<option value="' + option + '" ' + (option == this.settings[name].val ? 'selected' : '') + '>' + extra[option] + '</option>'; } temp += '</select>'; return temp; } default: return `<input type="${type}" name="${type}" id="slid_utilities_${name}"\n${'color' == type ? 'style="float:right;margin-top:5px"' : `class="inputGrey2" placeholder="${extra}"`}\nvalue="${this.settings[name].val}" oninput="${skidStr}.setSetting(\x27${name}\x27, this.value)"/>`; } } resetSettings() { if (confirm("Are you sure you want to reset all your settings? This will also refresh the page")) { Object.keys(localStorage).filter(x => x.includes("kro_utilities_")).forEach(x => localStorage.removeItem(x)); location.reload(); } } setSetting(t, e) { this.settings[t].val = e; this.saveVal(t, e); if (document.getElementById(`slid_utilities_${t}`)) document.getElementById(`slid_utilities_${t}`).innerHTML = e; if (this.settings[t].set) this.settings[t].set(e); } createObserver(elm, check, callback, onshow = true) { return new MutationObserver((mutationsList, observer) => { if (check == 'src' || onshow && mutationsList[0].target.style.display == 'block' || !onshow) { callback(mutationsList[0].target); } }).observe(elm, check == 'childList' ? {childList: true} : {attributes: true, attributeFilter: [check]}); } createListener(elm, type, callback = null) { if (!this.isDefined(elm)) { alert("Failed creating " + type + "listener"); return } elm.addEventListener(type, event => callback(event)); } createElement(element, attribute, inner) { if (!this.isDefined(element)) { return null; } if (!this.isDefined(inner)) { inner = ""; } let el = document.createElement(element); if (this.isType(attribute, 'object')) { for (let key in attribute) { el.setAttribute(key, attribute[key]); } } if (!Array.isArray(inner)) { inner = [inner]; } for (let i = 0; i < inner.length; i++) { if (inner[i].tagName) { el.appendChild(inner[i]); } else { el.appendChild(document.createTextNode(inner[i])); } } return el; } createButton(name, iconURL, fn, visible) { visible = visible ? "inherit":"none"; let menu = document.querySelector("#menuItemContainer"); let icon = this.createElement("div",{"class":"menuItemIcon", "style":`background-image:url("${iconURL}");display:inherit;`}); let title= this.createElement("div",{"class":"menuItemTitle", "style":`display:inherit;`}, name); let host = this.createElement("div",{"id":"mainButton", "class":"menuItem", "onmouseenter":"playTick()", "onclick":"showWindow(12)", "style":`display:${visible};`},[icon, title]); if (menu) menu.append(host) } objectHas(obj, arr) { return arr.some(prop => obj.hasOwnProperty(prop)); } getVersion() { const elems = document.getElementsByClassName('terms'); const version = elems[elems.length - 1].innerText; return version; } saveAs(name, data) { let blob = new Blob([data], {type: 'text/plain'}); let el = window.document.createElement("a"); el.href = window.URL.createObjectURL(blob); el.download = name; window.document.body.appendChild(el); el.click(); window.document.body.removeChild(el); } saveScript() { this.fetchScript().then(script => { this.saveAs("game_" + this.getVersion() + ".js", script) }) } isKeyDown(key) { return this.downKeys.has(key); } simulateKey(keyCode) { var oEvent = document.createEvent('KeyboardEvent'); // Chromium Hack Object.defineProperty(oEvent, 'keyCode', { get : function() { return this.keyCodeVal; } }); Object.defineProperty(oEvent, 'which', { get : function() { return this.keyCodeVal; } }); if (oEvent.initKeyboardEvent) { oEvent.initKeyboardEvent("keypress", true, true, document.defaultView, keyCode, keyCode, "", "", false, ""); } else { oEvent.initKeyEvent("keypress", true, true, document.defaultView, false, false, false, false, keyCode, 0); } oEvent.keyCodeVal = keyCode; if (oEvent.keyCode !== keyCode) { alert("keyCode mismatch " + oEvent.keyCode + "(" + oEvent.which + ")"); } document.body.dispatchEvent(oEvent); } toggleMenu() { let lock = document.pointerLockElement || document.mozPointerLockElement; if (lock) document.exitPointerLock(); window.showWindow(12); if (this.isDefined(window.SOUND)) window.SOUND.play(`tick_0`,0.1) } onLoad() { this.createSettings(); this.createObservers(); this.waitFor(_=>this.isDefined(this.exports)).then(_=> { if (!this.isDefined(this.exports)) { alert("This Mod Needs To Be Updated Please Try Agian Later"); return; } //console.dir(this.exports); let toFind = { overlay: ["render", "canvas"], config: ["accAnnounce", "availableRegions", "assetCat"], three: ["ACESFilmicToneMapping", "TextureLoader", "ObjectLoader"], ws: ["socketReady", "ingressPacketCount", "ingressPacketCount", "egressDataSize"], utility: ["VectorAdd", "VectorAngleSign"], //colors: ["challLvl", "getChallCol"], //ui: ["showEndScreen", "toggleControlUI", "toggleEndScreen", "updatePlayInstructions"], //events: ["actions", "events"], } for (let rootKey in this.exports) { let exp = this.exports[rootKey].exports; for (let name in toFind) { if (this.objectHas(exp, toFind[name])) { console.log("Found Export ", name); delete toFind[name]; this[name] = exp; } } } if (!(Object.keys(toFind).length === 0 && toFind.constructor === Object)) { for (let name in toFind) { alert("Failed To Find Export " + name); } } else { Object.defineProperty(this.config, "nameVisRate", { value: 0, writable: false, configurable: true, }) this.ctx = this.overlay.canvas.getContext('2d'); this.overlay.render = new Proxy(this.overlay.render, { apply: function(target, that, args) { return [target.apply(that, args), render.apply(that, args)] } }) function render(scale, game, controls, renderer, me) { let width = skid.overlay.canvas.width / scale; let height = skid.overlay.canvas.height / scale; const renderArgs = [scale, game, controls, renderer, me]; if (renderArgs && void 0 !== skid) { ["scale", "game", "controls", "renderer", "me"].forEach((item, index)=>{ skid[item] = renderArgs[index]; }); if (me) { skid.ctx.save(); skid.ctx.scale(scale, scale); //this.ctx.clearRect(0, 0, width, height); skid.onRender(); //window.requestAnimationFrame.call(window, renderArgs.callee.caller.bind(this)); skid.ctx.restore(); } if(skid.settings && skid.settings.autoClick.val && window.endUI.style.display == "none" && window.windowHolder.style.display == "none") { controls.toggle(true); } } } // Skins const $skins = Symbol("skins"); Object.defineProperty(Object.prototype, "skins", { set: function(fn) { this[$skins] = fn; if (void 0 == this.localSkins || !this.localSkins.length) { this.localSkins = Array.apply(null, Array(5e3)).map((x, i) => { return { ind: i, cnt: 0x1, } }) } return fn; }, get: function() { return skid.settings.skinUnlock.val && this.stats ? this.localSkins : this[$skins]; } }) this.waitFor(_=>this.ws.connected === true, 40000).then(_=> { this.ws.__event = this.ws._dispatchEvent.bind(this.ws); this.ws.__send = this.ws.send.bind(this.ws); this.ws.send = new Proxy(this.ws.send, { apply: function(target, that, args) { if (args[0] == "ah2") return; try { var original_fn = Function.prototype.apply.apply(target, [that, args]); } catch (e) { e.stack = e.stack = e.stack.replace(/\n.*Object\.apply.*/, ''); throw e; } if (args[0] === "en") { skid.skinCache = { main: args[1][2][0], secondary: args[1][2][1], hat: args[1][3], body: args[1][4], knife: args[1][9], dye: args[1][14], waist: args[1][17], } } return original_fn; } }) this.ws._dispatchEvent = new Proxy(this.ws._dispatchEvent, { apply: function(target, that, [type, event]) { if (type =="init") { if(event[10] && event[10].length && event[10].bill && skid.settings.customBillboard.val.length > 1) { event[10].bill.txt = skid.settings.customBillboard.val; } } if (skid.settings.skinUnlock.val && skid.skinCache && type === "0") { let skins = skid.skinCache; let pInfo = event[0]; let pSize = 38; while (pInfo.length % pSize !== 0) pSize++; for(let i = 0; i < pInfo.length; i += pSize) { if (pInfo[i] === skid.ws.socketId||0) { pInfo[i + 12] = [skins.main, skins.secondary]; pInfo[i + 13] = skins.hat; pInfo[i + 14] = skins.body; pInfo[i + 19] = skins.knife; pInfo[i + 24] = skins.dye; pInfo[i + 33] = skins.waist; } } } return target.apply(that, arguments[2]); } }) }) if (this.isDefined(window.SOUND)) { window.SOUND.play = new Proxy(window.SOUND.play, { apply: function(target, that, [src, vol, loop, rate]) { if ( src.startsWith("fart_") && skid.settings.disableHckSnd.val ) return; return target.apply(that, [src, vol, loop, rate]); } }) } AudioParam.prototype.setValueAtTime = new Proxy(AudioParam.prototype.setValueAtTime, { apply: function(target, that, [value, startTime]) { return target.apply(that, [value, 0]); } }) this.rayC = new this.three.Raycaster(); this.vec2 = new this.three.Vector2(0, 0); } }) } gameJS(script) { let entries = { // Deobfu inView: { regex: /(\w+\['(\w+)']\){if\(\(\w+=\w+\['\w+']\['position']\['clone']\(\))/, index: 2 }, spectating: { regex: /\['team']:window\['(\w+)']/, index: 1 }, //inView: { regex: /\]\)continue;if\(!\w+\['(.+?)\']\)continue;/, index: 1 }, //canSee: { regex: /\w+\['(\w+)']\(\w+,\w+\['x'],\w+\['y'],\w+\['z']\)\)&&/, index: 1 }, //procInputs: { regex: /this\['(\w+)']=function\((\w+),(\w+),\w+,\w+\){(this)\['recon']/, index: 1 }, aimVal: { regex: /this\['(\w+)']-=0x1\/\(this\['weapon']\['\w+']\/\w+\)/, index: 1 }, pchObjc: { regex: /0x0,this\['(\w+)']=new \w+\['Object3D']\(\),this/, index: 1 }, didShoot: { regex: /--,\w+\['(\w+)']=!0x0/, index: 1 }, nAuto: { regex: /'Single\\x20Fire','varN':'(\w+)'/, index: 1 }, crouchVal: { regex: /this\['(\w+)']\+=\w\['\w+']\*\w+,0x1<=this\['\w+']/, index: 1 }, recoilAnimY: { regex: /\+\(-Math\['PI']\/0x4\*\w+\+\w+\['(\w+)']\*\w+\['\w+']\)\+/, index: 1 }, //recoilAnimY: { regex: /this\['recoilAnim']=0x0,this\[(.*?\(''\))]/, index: 1 }, ammos: { regex: /\['length'];for\(\w+=0x0;\w+<\w+\['(\w+)']\['length']/, index: 1 }, weaponIndex: { regex: /\['weaponConfig']\[\w+]\['secondary']&&\(\w+\['(\w+)']==\w+/, index: 1 }, isYou: { regex: /0x0,this\['(\w+)']=\w+,this\['\w+']=!0x0,this\['inputs']/, index: 1 }, objInstances: { regex: /\w+\['\w+']\(0x0,0x0,0x0\);if\(\w+\['(\w+)']=\w+\['\w+']/, index: 1 }, getWorldPosition: { regex: /{\w+=\w+\['camera']\['(\w+)']\(\);/, index: 1 }, //mouseDownL: { regex: /this\['\w+'\]=function\(\){this\['(\w+)'\]=\w*0,this\['(\w+)'\]=\w*0,this\['\w+'\]={}/, index: 1 }, mouseDownR: { regex: /this\['(\w+)']=0x0,this\['keys']=/, index: 1 }, //reloadTimer: { regex: /this\['(\w+)']&&\(\w+\['\w+']\(this\),\w+\['\w+']\(this\)/, index: 1 }, maxHealth: { regex: /this\['health']\/this\['(\w+)']\?/, index: 1 }, xDire: { regex: /this\['(\w+)']=Math\['lerpAngle']\(this\['xDir2']/, index: 1 }, yDire: { regex: /this\['(\w+)']=Math\['lerpAngle']\(this\['yDir2']/, index: 1 }, //xVel: { regex: /this\['x']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedX']/, index: 1 }, yVel: { regex: /this\['y']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedY']/, index: 1 }, //zVel: { regex: /this\['z']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedZ']/, index: 1 }, // Patches exports: {regex: /(this\['\w+']\['\w+']\(this\);};},function\(\w+,\w+,(\w+)\){)/, patch: `$1 ${skidStr}.exports=$2.c; ${skidStr}.modules=$2.m;`}, inputs: {regex: /(\w+\['\w+']\[\w+\['\w+']\['\w+']\?'\w+':'push']\()(\w+)\),/, patch: `$1${skidStr}.onInput($2)),`}, inView: {regex: /&&(\w+\['\w+'])\){(if\(\(\w+=\w+\['\w+']\['\w+']\['\w+'])/, patch: `){if(!$1&&void 0 !== ${skidStr}.nameTags)continue;$2`}, thirdPerson:{regex: /(\w+)\[\'config\'\]\[\'thirdPerson\'\]/g, patch: `void 0 !== ${skidStr}.thirdPerson`}, isHacker:{regex: /(window\['\w+']=)!0x0\)/, patch: `$1!0x1)`}, fixHowler:{regex: /(Howler\['orientation'](.+?)\)\),)/, patch: ``}, respawnT:{regex: /'\w+':0x3e8\*/g, patch: `'respawnT':0x0*`}, anticheat1:{regex: /&&\w+\(\),window\['utilities']&&\(\w+\(null,null,null,!0x0\),\w+\(\)\)/, patch: ""}, anticheat2:{regex: /(\[]instanceof Array;).*?(var)/, patch: "$1 $2"}, anticheat3:{regex: /windows\['length'\]>\d+.*?0x25/, patch: `0x25`}, commandline:{regex: /Object\['defineProperty']\(console.*?\),/, patch: ""}, writeable:{regex: /'writeable':!0x1/g, patch: "writeable:true"}, configurable:{regex: /'configurable':!0x1/g, patch: "configurable:true"}, typeError:{regex: /throw new TypeError/g, patch: "console.error"}, error:{regex: /throw new Error/g, patch: "console.error"}, }; for(let name in entries) { let object = entries[name]; let found = object.regex.exec(script); if (object.hasOwnProperty('index')) { if (!found) { object.val = null; alert("Failed to Find " + name); } else { object.val = found[object.index]; console.log ("Found ", name, ":", object.val); } Object.defineProperty(skid.vars, name, { configurable: false, value: object.val }); } else if (found) { script = script.replace(object.regex, object.patch); console.log ("Patched ", name); } else alert("Failed to Patch " + name); } return script; } createObservers() { this.createObserver(window.instructionsUpdate, 'style', (target) => { if (this.settings.autoFindNew.val) { console.log(target) if (['Kicked', 'Banned', 'Disconnected', 'Error', 'Game is full'].some(text => target && target.innerHTML.includes(text))) { location = document.location.origin; } } }); this.createListener(document, "keyup", event => { if (this.downKeys.has(event.code)) this.downKeys.delete(event.code) }) this.createListener(document, "keydown", event => { if (event.code == "F1") { event.preventDefault(); this.toggleMenu(); } if ('INPUT' == document.activeElement.tagName || !window.endUI && window.endUI.style.display) return; switch (event.code) { case 'NumpadSubtract': document.exitPointerLock(); //console.log(document.exitPointerLock) console.dirxml(this) break; default: if (!this.downKeys.has(event.code)) this.downKeys.add(event.code); break; } }) this.createListener(document, "mouseup", event => { switch (event.button) { case 1: event.preventDefault(); this.toggleMenu(); break; default: break; } }) } onRender() { /* hrt / ttap - https://github.com/hrt */ this.renderFrame ++; if (this.renderFrame >= 100000) this.renderFrame = 0; let scaledWidth = this.ctx.canvas.width / this.scale; let scaledHeight = this.ctx.canvas.height / this.scale; let playerScale = (2 * this.consts.armScale + this.consts.chestWidth + this.consts.armInset) / 2 let worldPosition = this.renderer.camera[this.vars.getWorldPosition](); let espVal = this.settings.renderESP.val; if (espVal ==="walls"||espVal ==="twoD") this.nameTags = undefined; else this.nameTags = true; if (this.settings.autoActivateNuke.val && this.me && Object.keys(this.me.streaks).length) { /*chonker*/ this.ws.__send("k", 0); } if (espVal !== "off") { this.overlay.healthColE = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656"; } for (let iter = 0, length = this.game.players.list.length; iter < length; iter++) { let player = this.game.players.list[iter]; if (player[this.vars.isYou] || !player.active || !this.isDefined(player[this.vars.objInstances]) || this.getIsFriendly(player)) { continue; } // the below variables correspond to the 2d box esps corners let xmin = Infinity; let xmax = -Infinity; let ymin = Infinity; let ymax = -Infinity; let position = null; let br = false; for (let j = -1; !br && j < 2; j+=2) { for (let k = -1; !br && k < 2; k+=2) { for (let l = 0; !br && l < 2; l++) { if (position = player[this.vars.objInstances].position.clone()) { position.x += j * playerScale; position.z += k * playerScale; position.y += l * (player.height - player[this.vars.crouchVal] * this.consts.crouchDst); if (!this.containsPoint(position)) { br = true; break; } position.project(this.renderer.camera); xmin = Math.min(xmin, position.x); xmax = Math.max(xmax, position.x); ymin = Math.min(ymin, position.y); ymax = Math.max(ymax, position.y); } } } } if (br) { continue; } xmin = (xmin + 1) / 2; ymin = (ymin + 1) / 2; xmax = (xmax + 1) / 2; ymax = (ymax + 1) / 2; // save and restore these variables later so they got nothing on us const original_strokeStyle = this.ctx.strokeStyle; const original_lineWidth = this.ctx.lineWidth; const original_font = this.ctx.font; const original_fillStyle = this.ctx.fillStyle; //Tracers if (this.settings.renderTracers.val) { CRC2d.save.apply(this.ctx, []); let screenPos = this.world2Screen(player[this.vars.objInstances].position); this.ctx.lineWidth = 4.5; this.ctx.beginPath(); this.ctx.moveTo(this.ctx.canvas.width/2, this.ctx.canvas.height - (this.ctx.canvas.height - scaledHeight)); this.ctx.lineTo(screenPos.x, screenPos.y); this.ctx.strokeStyle = "rgba(0, 0, 0, 0.25)"; this.ctx.stroke(); this.ctx.lineWidth = 2.5; this.ctx.strokeStyle = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656" this.ctx.stroke(); CRC2d.restore.apply(this.ctx, []); } CRC2d.save.apply(this.ctx, []); if (espVal == "twoD" || espVal == "full") { // perfect box esp this.ctx.lineWidth = 5; this.ctx.strokeStyle = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656" let distanceScale = Math.max(.3, 1 - this.getD3D(worldPosition.x, worldPosition.y, worldPosition.z, player.x, player.y, player.z) / 600); CRC2d.scale.apply(this.ctx, [distanceScale, distanceScale]); let xScale = scaledWidth / distanceScale; let yScale = scaledHeight / distanceScale; CRC2d.beginPath.apply(this.ctx, []); ymin = yScale * (1 - ymin); ymax = yScale * (1 - ymax); xmin = xScale * xmin; xmax = xScale * xmax; CRC2d.moveTo.apply(this.ctx, [xmin, ymin]); CRC2d.lineTo.apply(this.ctx, [xmin, ymax]); CRC2d.lineTo.apply(this.ctx, [xmax, ymax]); CRC2d.lineTo.apply(this.ctx, [xmax, ymin]); CRC2d.lineTo.apply(this.ctx, [xmin, ymin]); CRC2d.stroke.apply(this.ctx, []); if (espVal == "full") { // health bar this.ctx.fillStyle = "#000000"; let barMaxHeight = ymax - ymin; CRC2d.fillRect.apply(this.ctx, [xmin - 7, ymin, -10, barMaxHeight]); this.ctx.fillStyle = player.health > 75 ? "green" : player.health > 40 ? "orange" : "red"; CRC2d.fillRect.apply(this.ctx, [xmin - 7, ymin, -10, barMaxHeight * (player.health / player[this.vars.maxHealth])]); // info this.ctx.font = "48px Sans-serif"; this.ctx.fillStyle = "white"; this.ctx.strokeStyle='black'; this.ctx.lineWidth = 1; let x = xmax + 7; let y = ymax; CRC2d.fillText.apply(this.ctx, [player.name||player.alias, x, y]); CRC2d.strokeText.apply(this.ctx, [player.name||player.alias, x, y]); this.ctx.font = "30px Sans-serif"; y += 35; CRC2d.fillText.apply(this.ctx, [player.weapon.name, x, y]); CRC2d.strokeText.apply(this.ctx, [player.weapon.name, x, y]); y += 35; CRC2d.fillText.apply(this.ctx, [player.health + ' HP', x, y]); CRC2d.strokeText.apply(this.ctx, [player.health + ' HP', x, y]); } } CRC2d.restore.apply(this.ctx, []); this.ctx.strokeStyle = original_strokeStyle; this.ctx.lineWidth = original_lineWidth; this.ctx.font = original_font; this.ctx.fillStyle = original_fillStyle; // skelly chams if (this.isDefined(player[this.vars.objInstances])) { let obj = player[this.vars.objInstances]; if (!obj.visible) { Object.defineProperty(player[this.vars.objInstances], 'visible', { value: true, writable: false }); } obj.traverse((child) => { let chamColor = this.settings.renderChams.val; let chamsEnabled = chamColor !== "off"; if (child && child.type == "Mesh" && child.material) { child.material.depthTest = chamsEnabled ? false : true; //if (this.isDefined(child.material.fog)) child.material.fog = chamsEnabled ? false : true; if (child.material.emissive) { child.material.emissive.r = chamColor == 'off' || chamColor == 'teal' || chamColor == 'green' || chamColor == 'blue' ? 0 : 0.55; child.material.emissive.g = chamColor == 'off' || chamColor == 'purple' || chamColor == 'blue' || chamColor == 'red' ? 0 : 0.55; child.material.emissive.b = chamColor == 'off' || chamColor == 'yellow' || chamColor == 'green' || chamColor == 'red' ? 0 : 0.55; } child.material.wireframe = this.settings.renderWireFrame.val ? true : false } }) } } } spinTick(input) { //this.game.players.getSpin(this.self); //this.game.players.saveSpin(this.self, angle); const angle = this.getAngleDst(input[2], this.me[this.vars.xDire]); this.spins = this.getStatic(this.spins, new Array()); this.spinTimer = this.getStatic(this.spinTimer, this.config.spinTimer); this.serverTickRate = this.getStatic(this.serverTickRate, this.config.serverTickRate); (this.spins.unshift(angle), this.spins.length > this.spinTimer / this.serverTickRate && (this.spins.length = Math.round(this.spinTimer / this.serverTickRate))) for (var e = 0, i = 0; i < this.spins.length; ++i) e += this.spins[i]; return Math.abs(e * (180 / Math.PI)); } raidBot(input) { let target = this.game.AI.ais.filter(enemy => { return undefined !== enemy.mesh && enemy.mesh && enemy.mesh.children[0] && enemy.canBSeen && enemy.health > 0 }).sort((p1, p2) => this.getD3D(this.me.x, this.me.z, p1.x, p1.z) - this.getD3D(this.me.x, this.me.z, p2.x, p2.z)).shift(); if (target) { let canSee = this.containsPoint(target.mesh.position) let yDire = (this.getDir(this.me.z, this.me.x, target.z, target.x) || 0) let xDire = ((this.getXDire(this.me.x, this.me.y, this.me.z, target.x, target.y + target.mesh.children[0].scale.y * 0.85, target.z) || 0) - this.consts.recoilMlt * this.me[this.vars.recoilAnimY]) if (this.me.weapon[this.vars.nAuto] && this.me[this.vars.didShoot]) { input[this.key.shoot] = 0; input[this.key.scope] = 0; this.me.inspecting = false; this.me.inspectX = 0; } else { if (!this.me.aimDir && canSee) { input[this.key.scope] = 1; if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } } } } else { this.resetLookAt(); } return input; } onInput(input) { if (this.isDefined(this.config) && this.config.aimAnimMlt) this.config.aimAnimMlt = 1; if (this.isDefined(this.controls) && this.isDefined(this.config) && this.settings.inActivity.val) { this.controls.idleTimer = 0; this.config.kickTimer = Infinity } if (this.me) { this.inputFrame ++; if (this.inputFrame >= 100000) this.inputFrame = 0; if (!this.game.playerSound[this.isProxy]) { this.game.playerSound = new Proxy(this.game.playerSound, { apply: function(target, that, args) { if (skid.settings.disableWpnSnd.val && args[0] && typeof args[0] == "string" && args[0].startsWith("weapon_")) return; return target.apply(that, args); }, get: function(target, key) { return key === skid.isProxy ? true : Reflect.get(target, key); }, }) } let isMelee = this.isDefined(this.me.weapon.melee)&&this.me.weapon.melee||this.isDefined(this.me.weapon.canThrow)&&this.me.weapon.canThrow; let ammoLeft = this.me[this.vars.ammos][this.me[this.vars.weaponIndex]]; // autoReload if (this.settings.autoReload.val) { //let capacity = this.me.weapon.ammo; //if (ammoLeft < capacity) if (isMelee) { if (!this.me.canThrow) { //this.me.refillKnife(); } } else if (!ammoLeft) { this.game.players.reload(this.me); input[this.key.reload] = 1; // this.me[this.vars.reloadTimer] = 1; //this.me.resetAmmo(); } } //Auto Bhop let autoBhop = this.settings.autoBhop.val; if (autoBhop !== "off") { if (this.isKeyDown("Space") || autoBhop == "autoJump" || autoBhop == "autoSlide") { this.controls.keys[this.controls.binds.jumpKey.val] ^= 1; if (this.controls.keys[this.controls.binds.jumpKey.val]) { this.controls.didPressed[this.controls.binds.jumpKey.val] = 1; } if (this.isKeyDown("Space") || autoBhop == "autoSlide") { if (this.me[this.vars.yVel] < -0.03 && this.me.canSlide) { setTimeout(() => { this.controls.keys[this.controls.binds.crouchKey.val] = 0; }, this.me.slideTimer||325); this.controls.keys[this.controls.binds.crouchKey.val] = 1; this.controls.didPressed[this.controls.binds.crouchKey.val] = 1; } } } } //Autoaim if (this.settings.autoAim.val !== "off") { this.playerMaps.length = 0; this.rayC.setFromCamera(this.vec2, this.renderer.fpsCamera); let target = this.game.players.list.filter(enemy => { let hostile = undefined !== enemy[this.vars.objInstances] && enemy[this.vars.objInstances] && !enemy[this.vars.isYou] && !this.getIsFriendly(enemy) && enemy.health > 0 && this.getInView(enemy); if (hostile) this.playerMaps.push( enemy[this.vars.objInstances] ); return hostile }).sort((p1, p2) => this.getD3D(this.me.x, this.me.z, p1.x, p1.z) - this.getD3D(this.me.x, this.me.z, p2.x, p2.z)).shift(); if (target) { //let count = this.spinTick(input); //if (count < 360) { // input[2] = this.me[this.vars.xDire] + Math.PI; //} else console.log("spins ", count); //target.jumpBobY * this.config.jumpVel let canSee = this.containsPoint(target[this.vars.objInstances].position); let inCast = this.rayC.intersectObjects(this.playerMaps, true).length; let yDire = (this.getDir(this.me.z, this.me.x, target.z, target.x) || 0); let xDire = ((this.getXDire(this.me.x, this.me.y, this.me.z, target.x, target.y - target[this.vars.crouchVal] * this.consts.crouchDst + this.me[this.vars.crouchVal] * this.consts.crouchDst, target.z) || 0) - this.consts.recoilMlt * this.me[this.vars.recoilAnimY]) if (this.me.weapon[this.vars.nAuto] && this.me[this.vars.didShoot]) { input[this.key.shoot] = 0; input[this.key.scope] = 0; this.me.inspecting = false; this.me.inspectX = 0; } else if (!canSee && this.settings.frustrumCheck.val) this.resetLookAt(); else if (ammoLeft||isMelee) { input[this.key.scope] = this.settings.autoAim.val === "assist"||this.settings.autoAim.val === "correction"||this.settings.autoAim.val === "trigger" ? this.controls[this.vars.mouseDownR] : 0; switch (this.settings.autoAim.val) { case "quickScope": input[this.key.scope] = 1; if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { if (!this.me.canThrow||!isMelee) input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } break; case "assist": case "easyassist": if (input[this.key.scope] || this.settings.autoAim.val === "easyassist") { if (!this.me.aimDir && canSee || this.settings.autoAim.val === "easyassist") { input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } } break; case "silent": if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { if (!this.me.canThrow||!isMelee) input[this.key.shoot] = 1; } else input[this.key.scope] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 break; case "trigger": if (input[this.key.scope] && canSee && inCast) { input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 } break; case "correction": if (input[this.key.shoot] == 1) { input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 } break; default: this.resetLookAt(); break; } } } else { this.resetLookAt(); //input = this.raidBot(input); } } } //else if (this.settings.autoClick.val && !this.ui.hasEndScreen) { //this.config.deathDelay = 0; //this.controls.toggle(true); //} //this.game.config.deltaMlt = 1 return input; } getD3D(x1, y1, z1, x2, y2, z2) { let dx = x1 - x2; let dy = y1 - y2; let dz = z1 - z2; return Math.sqrt(dx * dx + dy * dy + dz * dz); } getAngleDst(a, b) { return Math.atan2(Math.sin(b - a), Math.cos(a - b)); } getXDire(x1, y1, z1, x2, y2, z2) { let h = Math.abs(y1 - y2); let dst = this.getD3D(x1, y1, z1, x2, y2, z2); return (Math.asin(h / dst) * ((y1 > y2)?-1:1)); } getDir(x1, y1, x2, y2) { return Math.atan2(y1 - y2, x1 - x2); } getDistance(x1, y1, x2, y2) { return Math.sqrt((x2 -= x1) * x2 + (y2 -= y1) * y2); } containsPoint(point) { let planes = this.renderer.frustum.planes; for (let i = 0; i < 6; i ++) { if (planes[i].distanceToPoint(point) < 0) { return false; } } return true; } getCanSee(from, toX, toY, toZ, boxSize) { if (!from) return 0; boxSize = boxSize||0; for (let obj, dist = this.getD3D(from.x, from.y, from.z, toX, toY, toZ), xDr = this.getDir(from.z, from.x, toZ, toX), yDr = this.getDir(this.getDistance(from.x, from.z, toX, toZ), toY, 0, from.y), dx = 1 / (dist * Math.sin(xDr - Math.PI) * Math.cos(yDr)), dz = 1 / (dist * Math.cos(xDr - Math.PI) * Math.cos(yDr)), dy = 1 / (dist * Math.sin(yDr)), yOffset = from.y + (from.height || 0) - this.consts.cameraHeight, aa = 0; aa < this.game.map.manager.objects.length; ++aa) { if (!(obj = this.game.map.manager.objects[aa]).noShoot && obj.active && !obj.transparent && (!this.settings.wallPenetrate.val || (!obj.penetrable || !this.me.weapon.pierce))) { let tmpDst = this.lineInRect(from.x, from.z, yOffset, dx, dz, dy, obj.x - Math.max(0, obj.width - boxSize), obj.z - Math.max(0, obj.length - boxSize), obj.y - Math.max(0, obj.height - boxSize), obj.x + Math.max(0, obj.width - boxSize), obj.z + Math.max(0, obj.length - boxSize), obj.y + Math.max(0, obj.height - boxSize)); if (tmpDst && 1 > tmpDst) return tmpDst; } } /* let terrain = this.game.map.terrain; if (terrain) { let terrainRaycast = terrain.raycast(from.x, -from.z, yOffset, 1 / dx, -1 / dz, 1 / dy); if (terrainRaycast) return utl.getD3D(from.x, from.y, from.z, terrainRaycast.x, terrainRaycast.z, -terrainRaycast.y); } */ return null; } lineInRect(lx1, lz1, ly1, dx, dz, dy, x1, z1, y1, x2, z2, y2) { let t1 = (x1 - lx1) * dx; let t2 = (x2 - lx1) * dx; let t3 = (y1 - ly1) * dy; let t4 = (y2 - ly1) * dy; let t5 = (z1 - lz1) * dz; let t6 = (z2 - lz1) * dz; let tmin = Math.max(Math.max(Math.min(t1, t2), Math.min(t3, t4)), Math.min(t5, t6)); let tmax = Math.min(Math.min(Math.max(t1, t2), Math.max(t3, t4)), Math.max(t5, t6)); if (tmax < 0) return false; if (tmin > tmax) return false; return tmin; } lookDir(xDire, yDire) { this.controls.object.rotation.y = yDire this.controls[this.vars.pchObjc].rotation.x = xDire; this.controls[this.vars.pchObjc].rotation.x = Math.max(-this.consts.halfPI, Math.min(this.consts.halfPI, this.controls[this.vars.pchObjc].rotation.x)); this.controls.yDr = (this.controls[this.vars.pchObjc].rotation.x % Math.PI).round(3); this.controls.xDr = (this.controls.object.rotation.y % Math.PI).round(3); this.renderer.camera.updateProjectionMatrix(); this.renderer.updateFrustum(); } resetLookAt() { this.controls.yDr = this.controls[this.vars.pchObjc].rotation.x; this.controls.xDr = this.controls.object.rotation.y; this.renderer.camera.updateProjectionMatrix(); this.renderer.updateFrustum(); } world2Screen (position) { let pos = position.clone(); let scaledWidth = this.ctx.canvas.width / this.scale; let scaledHeight = this.ctx.canvas.height / this.scale; pos.project(this.renderer.camera); pos.x = (pos.x + 1) / 2; pos.y = (-pos.y + 1) / 2; pos.x *= scaledWidth; pos.y *= scaledHeight; return pos; } getInView(entity) { return null == this.getCanSee(this.me, entity.x, entity.y, entity.z); } getIsFriendly(entity) { return (this.me && this.me.team ? this.me.team : this.me.spectating ? 0x1 : 0x0) == entity.team } } function loadWASM() { window.Function = new Proxy(window.Function, { construct(target, args) { const original = new target(...args); if (args.length) { let body = args[args.length - 1]; if (body.length > 38e5) { // game.js at game loader Easy Method //console.log(body) } else if (args[0] == "requireRegisteredType") { return (function(...fnArgs){ // Expose WASM functions if (!window.hasOwnProperty("WASM")) { window.Object.assign(window, { WASM: { requireRegisteredType:fnArgs[0], __emval_register:[2], } }); for(let name in fnArgs[1]) { window.WASM[name] = fnArgs[1][name]; switch (name) { case "__Z01dynCall_fijfiv": //game.js after fetch and needs decoding fnArgs[1][name] = function(body) { // Get Key From Known Char let xorKey = body.charCodeAt() ^ '!'.charCodeAt(), str = "", ret =""; // Decode Mangled String for (let i = 0, strLen = body.length; i < strLen; i++) { str += String.fromCharCode(body.charCodeAt(i) ^ xorKey); } // Manipulate String //console.log(str) window[skidStr] = new Skid(); str = skid.gameJS(str); //ReEncode Mangled String for (let i = 0, strLen = str.length; i < strLen; i++) { ret += String.fromCharCode(str[i].charCodeAt() ^ xorKey); } // Return With Our Manipulated Code return window.WASM[name].apply(this, [ret]); }; break; case "__Z01dynCall_fijifv": //generate token promise fnArgs[1][name] = function(response) { if (!response.ok) { throw new window.Error("Network response from " + response.url + " was not ok") } let promise = window.WASM[name].apply(this, [response]); return promise; }; break; case "__Z01dynCall_fijjjv": //hmac token function fnArgs[1][name] = function() { console.log(arguments[0]); return window.WASM[name].apply(this, arguments); }; break; } } } return new target(...args).apply(this, fnArgs); }) } // If changed return with spoofed toString(); if (args[args.length - 1] !== body) { args[args.length - 1] = body; let patched = new target(...args); patched.toString = () => original.toString(); return patched; } } return original; } }) function onPageLoad() { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = `<div id="settHolder"><img src="https://i.imgur.com/yzb2ZmS.gif" width="25%"></div><a href='https://coder369.ml/d/' target='_blank.'><div class="imageButton discordSocial"></div></a>` window.request = (url, type, opt = {}) => fetch(url, opt).then(response => response.ok ? response[type]() : null); let Module = { onRuntimeInitialized: function() { function e(e) { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = "<div style='color: rgba(255, 255, 255, 0.6)'>" + e + "</div><div style='margin-top:10px;font-size:20px;color:rgba(255,255,255,0.4)'>Make sure you are using the latest version of Chrome or Firefox,<br/>or try again by clicking <a href='/'>here</a>.</div>"; window.instructionHolder.style.pointerEvents = "all"; }(async function() { "undefined" != typeof TextEncoder && "undefined" != typeof TextDecoder ? await Module.initialize(Module) : e("Your browser is not supported.") })().catch(err => { e("Failed to load game."); throw new Error(err); }) } }; window._debugTimeStart = Date.now(); window.request("/pkg/maindemo.wasm","arrayBuffer",{cache: "no-store"}).then(body => { Module.wasmBinary = body; window.request("/pkg/maindemo.js","text",{cache: "no-store"}).then(body => { body = body.replace(/(function UTF8ToString\((\w+),\w+\)){return \w+\?(.+?)\}/, `$1{let str=$2?$3;if (str.includes("CLEAN_WINDOW") || str.includes("Array.prototype.filter = undefined")) return "";return str;}`); body = body.replace(/(_emscripten_run_script\(\w+\){)eval\((\w+\(\w+\))\)}/, `$1 let str=$2; console.log(str);}`); new Function(body)(); window.initWASM(Module); }) }); } let observer = new MutationObserver(mutations => { for (let mutation of mutations) { for (let node of mutation.addedNodes) { if (node.tagName === 'SCRIPT' && node.type === "text/javascript" && node.innerHTML.startsWith("*!", 1)) { observer.disconnect(); node.innerHTML = onPageLoad.toString() + "\nonPageLoad();"; } } } }); observer.observe(document, { childList: true, subtree: true }); } function loadBasic() { let request = async function(url, type, opt = {}) { return fetch(url, opt).then(response => { if (!response.ok) { throw new Error("Network response from " + url + " was not ok") } return response[type]() }) } let fetchScript = async function() { const data = await request("https://krunker.io/social.html", "text"); const buffer = await request("https://krunker.io/pkg/krunker." + /\w.exports="(\w+)"/.exec(data)[1] + ".vries", "arrayBuffer"); const array = Array.from(new Uint8Array(buffer)); const xor = array[0] ^ '!'.charCodeAt(0); return array.map((code) => String.fromCharCode(code ^ xor)).join(''); } function onPageLoad() { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = `<div id="settHolder"><img src="https://i.imgur.com/yzb2ZmS.gif" width="25%"></div><a href='https://skidlamer.github.io/wp/' target='_blank.'><div class="imageButton discordSocial"></div></a>` window.instructionHolder.style.pointerEvents = "all"; window._debugTimeStart = Date.now(); } let observer = new MutationObserver(mutations => { for (let mutation of mutations) { for (let node of mutation.addedNodes) { if (node.tagName === 'SCRIPT' && node.type === "text/javascript" && node.innerHTML.startsWith("*!", 1)) { observer.disconnect(); node.innerHTML = onPageLoad.toString() + "\nonPageLoad();"; fetchScript().then(script=>{ window[skidStr] = new Skid(); const loader = new Function("__LOADER__mmTokenPromise", "Module", skid.gameJS(script)); loader(new Promise(res=>res(JSON.parse(xhr.responseText).token)), { csv: async () => 0 }); window.instructionHolder.style.pointerEvents = "none"; }) } } } }); observer.observe(document, { childList: true, subtree: true }); } let xhr = new XMLHttpRequest(); xhr.open('GET', 'https://api.sys32.dev/token', false); try { xhr.send(); if (xhr.status != 200) { loadWASM(); } else { if (xhr.responseText.includes('success')) { loadBasic(); } else loadWASM(); } } catch(err) { loadWASM(); }
testomatio / Check TestsGitHub action with static analysis for JavaScript tests.
mhowerton91 / History<!DOCTYPE html> <!-- Copyright 2016 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta charset="utf-8"> <title>Chrome Platform Status</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"> <link rel="manifest" href="/static/manifest.json"> <meta name="theme-color" content="#366597"> <link rel="icon" sizes="192x192" href="/static/img/crstatus_192.png"> <!-- iOS: run in full-screen mode and display upper status bar as translucent --> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <link rel="apple-touch-icon" href="/static/img/crstatus_128.png"> <link rel="apple-touch-icon-precomposed" href="/static/img/crstatus_128.png"> <link rel="shortcut icon" href="/static/img/crstatus_128.png"> <link rel="preconnect" href="https://www.google-analytics.com" crossorigin> <!-- <link rel="dns-prefetch" href="https://fonts.googleapis.com"> --> <!-- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> --> <!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400" media="none" onload="this.media='all'"> --> <!-- <link rel="stylesheet" href="/static/css/main.css"> --> <style>html,body{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,pre,a,abbr,acronym,address,code,del,dfn,em,img,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,caption,tbody,tfoot,thead,tr{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}blockquote,q{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;quotes:"" ""}blockquote:before,q:before,blockquote:after,q:after{content:""}th,td,caption{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;text-align:left;font-weight:normal;vertical-align:middle}table{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-collapse:separate;border-spacing:0;vertical-align:middle}a img{border:none}*{box-sizing:border-box}*{-webkit-tap-highlight-color:transparent}h1,h2,h3,h4{font-weight:300}h1{font-size:30px}h2,h3,h4{color:#444}h2{font-size:25px}h3{font-size:20px}a{text-decoration:none;color:#4580c0}a:hover{text-decoration:underline;color:#366597}b{font-weight:600}input:not([type="submit"]),textarea{border:1px solid #D4D4D4}input:not([type="submit"])[disabled],textarea[disabled]{opacity:0.5}button,.button{display:inline-block;background:linear-gradient(#F9F9F9 40%, #E3E3E3 70%);border:1px solid #a9a9a9;border-radius:3px;padding:5px 8px;outline:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;text-shadow:1px 1px #fff;font-size:10pt}button:not(:disabled):hover{border-color:#515151}button:not(:disabled):active{background:linear-gradient(#E3E3E3 40%, #F9F9F9 70%)}.comma::after{content:',\00a0'}html,body{height:100%}body{color:#666;font:14px "Roboto", sans-serif;font-weight:400;-webkit-font-smoothing:antialiased;background-color:#eee}body.loading #spinner{display:flex}body.loading chromedash-toast{visibility:hidden}#spinner{display:none;align-items:center;justify-content:center;position:fixed;height:calc(100% - 54px - $header-height);max-width:768px;width:100%}#site-banner{display:none;background:#4580c0;color:#fff;position:fixed;z-index:1;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;text-transform:capitalize;text-align:center;transform:rotate(35deg);right:-40px;top:20px;padding:10px 40px 8px 60px;box-shadow:inset 0px 5px 6px -3px rgba(0,0,0,0.4)}#site-banner iron-icon{margin-right:4px;height:20px;width:20px}#site-banner a{color:currentcolor;text-decoration:none}app-drawer{font-size:14px}app-drawer .drawer-content-wrapper{height:100%;overflow:auto;padding:16px}app-drawer paper-listbox{background-color:inherit !important}app-drawer paper-listbox paper-item{font-size:inherit !important}app-drawer h3{margin-bottom:16px;text-transform:uppercase;font-weight:500;font-size:14px;color:inherit}app-header{background-color:#eee;right:0;top:0;left:0;z-index:1}app-header[fixed]{position:fixed}.main-toolbar{display:flex;position:relative;padding:0 16px}header,footer{display:flex;align-items:center;text-shadow:0 1px 0 white}header{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}header a{text-decoration:none !important}header nav{display:flex;align-items:center;margin-left:16px}header nav a{background-color:#FAFAFA;background:linear-gradient(to bottom, white, #F2F2F2);padding:0.75em 1em;box-shadow:1px 1px 4px rgba(0,0,0,0.065);cursor:pointer;font-size:16px;text-align:center;border-radius:3px;border-bottom:1px solid #D4D4D4;border-right:1px solid #D4D4D4;white-space:nowrap}header nav a:active{position:relative;top:1px;left:1px;box-shadow:3px 3px 4px rgba(0,0,0,0.065)}header nav a.disabled{opacity:0.5;pointer-events:none}header nav paper-menu-button{margin:0 !important;padding:0 !important;line-height:1}header nav paper-menu-button .dropdown-content{display:flex;flex-direction:column;contain:content}header aside{background-color:#FAFAFA;background:linear-gradient(to bottom, white, #F2F2F2);padding:0.75em 1em;box-shadow:1px 1px 4px rgba(0,0,0,0.065);border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-bottom:1px solid #D4D4D4;border-right:1px solid #D4D4D4;background:url(/static/img/chrome_logo.svg) no-repeat 16px 50%;background-size:48px;background-color:#fafafa;padding-left:72px}header aside hgroup a{color:currentcolor}header aside h1{line-height:1}header aside img{height:45px;width:45px;margin-right:7px}footer{background-color:#FAFAFA;background:linear-gradient(to bottom, white, #F2F2F2);padding:0.75em 1em;box-shadow:1px 1px 4px rgba(0,0,0,0.065);font-size:12px;box-shadow:0 -2px 5px rgba(0,0,0,0.065);display:flex;flex-direction:column;justify-content:center;text-align:center;position:fixed;bottom:0;left:0;right:0;z-index:3}footer div{margin-top:4px}.description{line-height:1.4}#subheader,.subheader{display:flex;align-items:center;margin:16px 0;max-width:768px}#subheader .num-features,.subheader .num-features{font-weight:400}#subheader div.search input,.subheader div.search input{width:200px;outline:none;padding:10px 7px}#subheader div.actionlinks,.subheader div.actionlinks{display:flex;justify-content:flex-end;flex:1 0 auto;margin-left:16px}#subheader div.actionlinks .blue-button,.subheader div.actionlinks .blue-button{background:#366597;color:#fff;display:inline-flex;align-items:center;justify-content:center;max-height:35px;min-width:5.14em;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;text-transform:uppercase;text-decoration:none;border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;padding:0.7em 0.57em}#subheader div.actionlinks .blue-button iron-icon,.subheader div.actionlinks .blue-button iron-icon{margin-right:8px;height:24px;width:24px}#subheader div.actionlinks .legend,.subheader div.actionlinks .legend{font-size:18px;cursor:pointer;text-decoration:none}#container{display:flex;flex-direction:column;height:100%;width:100%}#content{margin:16px;position:relative;height:100%}#panels{display:flex;width:100%;overflow:hidden}@media only screen and (min-width: 701px){.main-toolbar .toolbar-content{max-width:768px}app-header{padding-left:200px;left:0 !important}}@media only screen and (max-width: 700px){h1{font-size:24px}h2{font-size:20px}h3{font-size:15px}app-header .main-toolbar{padding:0;display:block}app-header .main-toolbar iron-icon{width:24px}app-drawer{z-index:2}#content{margin-left:0;margin-right:0}header{margin:0;display:block}header aside{display:flex;padding:8px;border-radius:0;background-size:24px;background-position:48px 50%}header aside hgroup{padding-left:48px}header aside hgroup span{display:none}header nav{margin:0;justify-content:center;flex-wrap:wrap}header nav a{padding:5px 10px;margin:0;border-radius:0;flex:1 0 auto}#panels{display:block}#panels nav{display:none}.subheader .description{margin:0 16px}#subheader div:not(.search){display:none}#subheader div.search{text-align:center;flex:1 0 0;margin:0}chromedash-toast{width:100%;left:0;margin:0}}@media only screen and (min-width: 1100px){#site-banner{display:block}}body.loading chromedash-legend{display:none}body.loading chromedash-featurelist{visibility:hidden}body.loading .main-toolbar .dropdown-content{display:none} </style> <!-- <link rel="stylesheet" href="/static/css/metrics/metrics.css"> --> <style>#content h3{margin-bottom:16px}.data-panel{max-width:768px}.data-panel .description{margin-bottom:1em}.metric-nav{list-style-type:none}.metric-nav h3:not(:first-of-type){margin-top:32px}.metric-nav li{text-align:center;border-top-left-radius:3px;border-top-right-radius:3px;background:linear-gradient(to bottom, white, #F2F2F2);box-shadow:1px 1px 4px rgba(0,0,0,0.065);padding:0.5em;margin-bottom:10px}@media only screen and (max-width: 700px){#subheader{margin:16px 0;text-align:center}.data-panel{margin:0 10px}} </style> <script> window.Polymer = window.Polymer || { dom: 'shadow', // Use native shadow dom. lazyRegister: 'max', useNativeCSSProperties: true, suppressTemplateNotifications: true, // Don't fire dom-change on dom-if, dom-bind, etc. suppressBindingNotifications: true // disableUpgradeEnabled: true // Works with `disable-upgrade` attr. When removed, upgrades element. }; var $ = function(selector) { return document.querySelector(selector); }; var $$ = function(selector) { return document.querySelectorAll(selector); }; </script> <style is="custom-style"> app-drawer { --app-drawer-width: 200px; --app-drawer-content-container: { background: #eee; }; } paper-item { --paper-item: { cursor: pointer; }; } </style> <link rel="import" href="/static/elements/metrics-imports.vulcanize.html"> </head> <body class="loading"> <!--<div id="site-banner"> <a href="https://www.youtube.com/watch?v=Rd0plknSPYU" target="_blank"> <iron-icon icon="chromestatus:ondemand-video"></iron-icon> How we built it</a> </div>--> <app-drawer-layout fullbleed> <app-drawer swipe-open> <div class="drawer-content-wrapper"> <ul class="metric-nav"> <h3>All properties</h3> <li><a href="/metrics/css/popularity">Stack rank</a></li> <li><a href="/metrics/css/timeline/popularity">Timeline</a></li> <h3>Animated properties</h3> <li><a href="/metrics/css/animated">Stack rank</a></li> <li><a href="/metrics/css/timeline/animated">Timeline</a></li> </ul> </div> </app-drawer> <app-header-layout> <app-header reveals fixed effects="waterfall"> <div class="main-toolbar"> <div class="toolbar-content"> <header> <aside> <iron-icon icon="chromestatus:menu" drawer-toggle></iron-icon> <hgroup> <a href="/features" target="_top"><h1>Chrome Platform Status</h1></a> <span>feature support & usage metrics</span> </hgroup> </aside> <nav> <a href="/features">Features</a> <a href="/samples" class="features">Samples</a> <paper-menu-button vertical-align="top" horizontal-align="right"> <a href="javascript:void(0)" class="dropdown-trigger">Usage Metrics</a> <div class="dropdown-content" hidden> <!-- hidden removed by lazy load code. --> <a href="/metrics/css/popularity" class="metrics">CSS</a> <a href="/metrics/feature/popularity" class="metrics">JS/HTML</a> </div> </paper-menu-button> </nav> </header> <div id="subheader"> <h2>CSS usage metrics > animated properties > timeline</h2> </div> </div> </div> </app-header> <div id="content"> <div id="spinner"><img src="/static/img/ring.svg"></div> <div class="data-panel"> <p class="description">Percentages are the number of times (as the fraction of all animated properties) this property is animated.</p> <chromedash-feature-timeline type="css" view="animated" title="Percentage of times (as the fraction of all animated properties) this property is animated." ></chromedash-feature-timeline> </div> </div> </app-header-layout> <footer> <p>Except as otherwise noted, the content of this page under <a href="https://creativecommons.org/licenses/by/2.5/">CC Attribution 2.5</a> license. Code examples are <a href="https://github.com/GoogleChrome/samples/blob/gh-pages/LICENSE">Apache-2.0</a>.</p> <div><a href="https://groups.google.com/a/chromium.org/forum/#!newtopic/blink-dev">File content issue</a> | <a href="https://docs.google.com/a/chromium.org/forms/d/1djZD0COt4NgRwDYesNLkYAb_O8YL39eEvF78vk06R9c/viewform">Request "edit" access</a> | <a href="https://github.com/GoogleChrome/chromium-dashboard/issues">File site bug</a> | <a href="https://docs.google.com/document/d/1jrSlM4Yhae7XCJ8BuasWx71CvDEMMbSKbXwx7hoh1Co/edit?pli=1" target="_blank">About</a> | <a href="https://www.google.com/accounts/ServiceLogin?service=ah&passive=true&continue=https://appengine.google.com/_ah/conflogin%3Fcontinue%3Dhttps://www.chromestatus.com/metrics/css/timeline/animated">Login</a> </div> </footer> </app-drawer-layout> <chromedash-toast msg="Welcome to chromestatus.com!"></chromedash-toast> <script> /*! (c) 2017 Copyright (c) 2016 The Google Inc. All rights reserved. (Apache2) */ "use strict";function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}}(),Metric=function(){function e(r){if(_classCallCheck(this,e),!r)throw Error("Please provide a metric name");if(!e.supportsPerfMark&&(console.warn("Timeline won't be marked for \""+r+'".'),!e.supportsPerfNow))throw Error("This library cannot be used in this browser.");this.name=r}return _createClass(e,[{key:"duration",get:function(){var r=this._end-this._start;if(e.supportsPerfMark){var n=performance.getEntriesByName(this.name)[0];n&&"measure"!==n.entryType&&(r=n.duration)}return r||-1}}],[{key:"supportsPerfNow",get:function(){return performance&&performance.now}},{key:"supportsPerfMark",get:function(){return performance&&performance.mark}}]),_createClass(e,[{key:"log",value:function(){return console.info(this.name,this.duration,"ms"),this}},{key:"logAll",value:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.name;if(e.supportsPerfNow)for(var n=window.performance.getEntriesByName(r),t=0;t<n.length;++t){var a=n[t];console.info(r,a.duration,"ms")}return this}},{key:"start",value:function(){return this._start?(console.warn("Recording already started."),this):(this._start=performance.now(),e.supportsPerfMark&&performance.mark("mark_"+this.name+"_start"),this)}},{key:"end",value:function(){if(this._end)return console.warn("Recording already stopped."),this;if(this._end=performance.now(),e.supportsPerfMark){var r="mark_"+this.name+"_start",n="mark_"+this.name+"_end";performance.mark(n),performance.measure(this.name,r,n)}return this}},{key:"sendToAnalytics",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.name,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.duration;return window.ga?n>=0&&ga("send","timing",e,r,n):console.warn("Google Analytics has not been loaded"),this}}]),e}(); </script> <script> document.addEventListener('WebComponentsReady', function(e) { var timeline = $('chromedash-feature-timeline'); timeline.props = [[469,"alias-epub-caption-side"],[470,"alias-epub-text-combine"],[471,"alias-epub-text-emphasis"],[472,"alias-epub-text-emphasis-color"],[473,"alias-epub-text-emphasis-style"],[474,"alias-epub-text-orientation"],[475,"alias-epub-text-transform"],[476,"alias-epub-word-break"],[477,"alias-epub-writing-mode"],[478,"alias-webkit-align-content"],[479,"alias-webkit-align-items"],[480,"alias-webkit-align-self"],[166,"alias-webkit-animation"],[167,"alias-webkit-animation-delay"],[169,"alias-webkit-animation-duration"],[170,"alias-webkit-animation-fill-mode"],[171,"alias-webkit-animation-iteration-count"],[172,"alias-webkit-animation-name"],[173,"alias-webkit-animation-play-state"],[174,"alias-webkit-animation-timing-function"],[177,"alias-webkit-backface-visibility"],[181,"alias-webkit-background-size"],[481,"alias-webkit-border-bottom-left-radius"],[482,"alias-webkit-border-bottom-right-radius"],[197,"alias-webkit-border-radius"],[483,"alias-webkit-border-top-left-radius"],[484,"alias-webkit-border-top-right-radius"],[212,"alias-webkit-box-shadow"],[485,"alias-webkit-box-sizing"],[218,"alias-webkit-column-count"],[219,"alias-webkit-column-gap"],[221,"alias-webkit-column-rule"],[222,"alias-webkit-column-rule-color"],[223,"alias-webkit-column-rule-style"],[224,"alias-webkit-column-rule-width"],[225,"alias-webkit-column-span"],[226,"alias-webkit-column-width"],[227,"alias-webkit-columns"],[486,"alias-webkit-flex"],[487,"alias-webkit-flex-basis"],[488,"alias-webkit-flex-direction"],[489,"alias-webkit-flex-flow"],[490,"alias-webkit-flex-grow"],[491,"alias-webkit-flex-shrink"],[492,"alias-webkit-flex-wrap"],[493,"alias-webkit-justify-content"],[494,"alias-webkit-opacity"],[495,"alias-webkit-order"],[308,"alias-webkit-perspective"],[309,"alias-webkit-perspective-origin"],[496,"alias-webkit-shape-image-threshold"],[497,"alias-webkit-shape-margin"],[498,"alias-webkit-shape-outside"],[537,"alias-webkit-text-size-adjust"],[326,"alias-webkit-transform"],[327,"alias-webkit-transform-origin"],[331,"alias-webkit-transform-style"],[332,"alias-webkit-transition"],[333,"alias-webkit-transition-delay"],[334,"alias-webkit-transition-duration"],[335,"alias-webkit-transition-property"],[336,"alias-webkit-transition-timing-function"],[230,"align-content"],[231,"align-items"],[232,"align-self"],[386,"alignment-baseline"],[454,"all"],[424,"animation"],[425,"animation-delay"],[426,"animation-direction"],[427,"animation-duration"],[428,"animation-fill-mode"],[429,"animation-iteration-count"],[430,"animation-name"],[431,"animation-play-state"],[432,"animation-timing-function"],[532,"apply-at-rule"],[508,"backdrop-filter"],[451,"backface-visibility"],[21,"background"],[22,"background-attachment"],[419,"background-blend-mode"],[23,"background-clip"],[24,"background-color"],[25,"background-image"],[26,"background-origin"],[27,"background-position"],[28,"background-position-x"],[29,"background-position-y"],[30,"background-repeat"],[31,"background-repeat-x"],[32,"background-repeat-y"],[33,"background-size"],[387,"baseline-shift"],[551,"block-size"],[34,"border"],[35,"border-bottom"],[36,"border-bottom-color"],[37,"border-bottom-left-radius"],[38,"border-bottom-right-radius"],[39,"border-bottom-style"],[40,"border-bottom-width"],[41,"border-collapse"],[42,"border-color"],[43,"border-image"],[44,"border-image-outset"],[45,"border-image-repeat"],[46,"border-image-slice"],[47,"border-image-source"],[48,"border-image-width"],[49,"border-left"],[50,"border-left-color"],[51,"border-left-style"],[52,"border-left-width"],[53,"border-radius"],[54,"border-right"],[55,"border-right-color"],[56,"border-right-style"],[57,"border-right-width"],[58,"border-spacing"],[59,"border-style"],[60,"border-top"],[61,"border-top-color"],[62,"border-top-left-radius"],[63,"border-top-right-radius"],[64,"border-top-style"],[65,"border-top-width"],[66,"border-width"],[67,"bottom"],[68,"box-shadow"],[69,"box-sizing"],[520,"break-after"],[521,"break-before"],[522,"break-inside"],[416,"buffered-rendering"],[70,"caption-side"],[547,"caret-color"],[71,"clear"],[72,"clip"],[355,"clip-path"],[356,"clip-rule"],[2,"color"],[365,"color-interpolation"],[366,"color-interpolation-filters"],[367,"color-profile"],[368,"color-rendering"],[523,"column-count"],[440,"column-fill"],[524,"column-gap"],[525,"column-rule"],[526,"column-rule-color"],[527,"column-rule-style"],[528,"column-rule-width"],[529,"column-span"],[530,"column-width"],[531,"columns"],[517,"contain"],[74,"content"],[75,"counter-increment"],[76,"counter-reset"],[77,"cursor"],[466,"cx"],[467,"cy"],[518,"d"],[3,"direction"],[4,"display"],[388,"dominant-baseline"],[78,"empty-cells"],[358,"enable-background"],[369,"fill"],[370,"fill-opacity"],[371,"fill-rule"],[359,"filter"],[233,"flex"],[234,"flex-basis"],[235,"flex-direction"],[236,"flex-flow"],[237,"flex-grow"],[238,"flex-shrink"],[239,"flex-wrap"],[79,"float"],[360,"flood-color"],[361,"flood-opacity"],[5,"font"],[516,"font-display"],[6,"font-family"],[514,"font-feature-settings"],[13,"font-kerning"],[7,"font-size"],[465,"font-size-adjust"],[80,"font-stretch"],[8,"font-style"],[9,"font-variant"],[533,"font-variant-caps"],[15,"font-variant-ligatures"],[535,"font-variant-numeric"],[549,"font-variation-settings"],[10,"font-weight"],[389,"glyph-orientation-horizontal"],[390,"glyph-orientation-vertical"],[453,"grid"],[422,"grid-area"],[418,"grid-auto-columns"],[250,"grid-auto-flow"],[417,"grid-auto-rows"],[248,"grid-column"],[245,"grid-column-end"],[511,"grid-column-gap"],[244,"grid-column-start"],[513,"grid-gap"],[249,"grid-row"],[247,"grid-row-end"],[512,"grid-row-gap"],[246,"grid-row-start"],[452,"grid-template"],[423,"grid-template-areas"],[242,"grid-template-columns"],[243,"grid-template-rows"],[81,"height"],[534,"hyphens"],[397,"image-orientation"],[507,"image-orientation"],[82,"image-rendering"],[398,"image-resolution"],[550,"inline-size"],[438,"internal-callback"],[436,"isolation"],[240,"justify-content"],[455,"justify-items"],[443,"justify-self"],[391,"kerning"],[83,"left"],[84,"letter-spacing"],[362,"lighting-color"],[556,"line-break"],[20,"line-height"],[85,"list-style"],[86,"list-style-image"],[87,"list-style-position"],[88,"list-style-type"],[89,"margin"],[90,"margin-bottom"],[91,"margin-left"],[92,"margin-right"],[93,"margin-top"],[372,"marker"],[373,"marker-end"],[374,"marker-mid"],[375,"marker-start"],[357,"mask"],[435,"mask-source-type"],[376,"mask-type"],[555,"max-block-size"],[94,"max-height"],[554,"max-inline-size"],[95,"max-width"],[406,"max-zoom"],[553,"min-block-size"],[96,"min-height"],[552,"min-inline-size"],[97,"min-width"],[407,"min-zoom"],[420,"mix-blend-mode"],[460,"motion"],[458,"motion-offset"],[457,"motion-path"],[459,"motion-rotation"],[433,"object-fit"],[437,"object-position"],[543,"offset"],[544,"offset-anchor"],[540,"offset-distance"],[541,"offset-path"],[545,"offset-position"],[548,"offset-rotate"],[542,"offset-rotation"],[98,"opacity"],[303,"order"],[408,"orientation"],[99,"orphans"],[100,"outline"],[101,"outline-color"],[102,"outline-offset"],[103,"outline-style"],[104,"outline-width"],[105,"overflow"],[538,"overflow-anchor"],[106,"overflow-wrap"],[107,"overflow-x"],[108,"overflow-y"],[109,"padding"],[110,"padding-bottom"],[111,"padding-left"],[112,"padding-right"],[113,"padding-top"],[114,"page"],[115,"page-break-after"],[116,"page-break-before"],[117,"page-break-inside"],[434,"paint-order"],[449,"perspective"],[450,"perspective-origin"],[557,"place-content"],[558,"place-items"],[118,"pointer-events"],[119,"position"],[120,"quotes"],[468,"r"],[121,"resize"],[122,"right"],[505,"rotate"],[463,"rx"],[464,"ry"],[506,"scale"],[444,"scroll-behavior"],[456,"scroll-blocks-on"],[502,"scroll-snap-coordinate"],[503,"scroll-snap-destination"],[500,"scroll-snap-points-x"],[501,"scroll-snap-points-y"],[499,"scroll-snap-type"],[439,"shape-image-threshold"],[346,"shape-inside"],[348,"shape-margin"],[347,"shape-outside"],[349,"shape-padding"],[377,"shape-rendering"],[123,"size"],[519,"snap-height"],[125,"speak"],[124,"src"],[363,"stop-color"],[364,"stop-opacity"],[378,"stroke"],[379,"stroke-dasharray"],[380,"stroke-dashoffset"],[381,"stroke-linecap"],[382,"stroke-linejoin"],[383,"stroke-miterlimit"],[384,"stroke-opacity"],[385,"stroke-width"],[127,"tab-size"],[126,"table-layout"],[128,"text-align"],[404,"text-align-last"],[392,"text-anchor"],[509,"text-combine-upright"],[129,"text-decoration"],[403,"text-decoration-color"],[401,"text-decoration-line"],[546,"text-decoration-skip"],[402,"text-decoration-style"],[130,"text-indent"],[441,"text-justify"],[131,"text-line-through"],[132,"text-line-through-color"],[133,"text-line-through-mode"],[134,"text-line-through-style"],[135,"text-line-through-width"],[510,"text-orientation"],[136,"text-overflow"],[137,"text-overline"],[138,"text-overline-color"],[139,"text-overline-mode"],[140,"text-overline-style"],[141,"text-overline-width"],[11,"text-rendering"],[142,"text-shadow"],[536,"text-size-adjust"],[143,"text-transform"],[144,"text-underline"],[145,"text-underline-color"],[146,"text-underline-mode"],[405,"text-underline-position"],[147,"text-underline-style"],[148,"text-underline-width"],[149,"top"],[421,"touch-action"],[442,"touch-action-delay"],[446,"transform"],[559,"transform-box"],[447,"transform-origin"],[448,"transform-style"],[150,"transition"],[151,"transition-delay"],[152,"transition-duration"],[153,"transition-property"],[154,"transition-timing-function"],[504,"translate"],[155,"unicode-bidi"],[156,"unicode-range"],[539,"user-select"],[409,"user-zoom"],[515,"variable"],[393,"vector-effect"],[157,"vertical-align"],[158,"visibility"],[168,"webkit-animation-direction"],[354,"webkit-app-region"],[412,"webkit-app-region"],[175,"webkit-appearance"],[176,"webkit-aspect-ratio"],[400,"webkit-background-blend-mode"],[178,"webkit-background-clip"],[179,"webkit-background-composite"],[180,"webkit-background-origin"],[399,"webkit-blend-mode"],[182,"webkit-border-after"],[183,"webkit-border-after-color"],[184,"webkit-border-after-style"],[185,"webkit-border-after-width"],[186,"webkit-border-before"],[187,"webkit-border-before-color"],[188,"webkit-border-before-style"],[189,"webkit-border-before-width"],[190,"webkit-border-end"],[191,"webkit-border-end-color"],[192,"webkit-border-end-style"],[193,"webkit-border-end-width"],[194,"webkit-border-fit"],[195,"webkit-border-horizontal-spacing"],[196,"webkit-border-image"],[198,"webkit-border-start"],[199,"webkit-border-start-color"],[200,"webkit-border-start-style"],[201,"webkit-border-start-width"],[202,"webkit-border-vertical-spacing"],[203,"webkit-box-align"],[228,"webkit-box-decoration-break"],[414,"webkit-box-decoration-break"],[204,"webkit-box-direction"],[205,"webkit-box-flex"],[206,"webkit-box-flex-group"],[207,"webkit-box-lines"],[208,"webkit-box-ordinal-group"],[209,"webkit-box-orient"],[210,"webkit-box-pack"],[211,"webkit-box-reflect"],[73,"webkit-clip-path"],[213,"webkit-color-correction"],[214,"webkit-column-axis"],[215,"webkit-column-break-after"],[216,"webkit-column-break-before"],[217,"webkit-column-break-inside"],[220,"webkit-column-progression"],[396,"webkit-cursor-visibility"],[410,"webkit-dashboard-region"],[229,"webkit-filter"],[413,"webkit-filter"],[341,"webkit-flow-from"],[340,"webkit-flow-into"],[12,"webkit-font-feature-settings"],[241,"webkit-font-size-delta"],[14,"webkit-font-smoothing"],[251,"webkit-highlight"],[252,"webkit-hyphenate-character"],[253,"webkit-hyphenate-limit-after"],[254,"webkit-hyphenate-limit-before"],[255,"webkit-hyphenate-limit-lines"],[256,"webkit-hyphens"],[258,"webkit-line-align"],[257,"webkit-line-box-contain"],[259,"webkit-line-break"],[260,"webkit-line-clamp"],[261,"webkit-line-grid"],[262,"webkit-line-snap"],[16,"webkit-locale"],[264,"webkit-logical-height"],[263,"webkit-logical-width"],[270,"webkit-margin-after"],[265,"webkit-margin-after-collapse"],[271,"webkit-margin-before"],[266,"webkit-margin-before-collapse"],[267,"webkit-margin-bottom-collapse"],[269,"webkit-margin-collapse"],[272,"webkit-margin-end"],[273,"webkit-margin-start"],[268,"webkit-margin-top-collapse"],[274,"webkit-marquee"],[275,"webkit-marquee-direction"],[276,"webkit-marquee-increment"],[277,"webkit-marquee-repetition"],[278,"webkit-marquee-speed"],[279,"webkit-marquee-style"],[280,"webkit-mask"],[281,"webkit-mask-box-image"],[282,"webkit-mask-box-image-outset"],[283,"webkit-mask-box-image-repeat"],[284,"webkit-mask-box-image-slice"],[285,"webkit-mask-box-image-source"],[286,"webkit-mask-box-image-width"],[287,"webkit-mask-clip"],[288,"webkit-mask-composite"],[289,"webkit-mask-image"],[290,"webkit-mask-origin"],[291,"webkit-mask-position"],[292,"webkit-mask-position-x"],[293,"webkit-mask-position-y"],[294,"webkit-mask-repeat"],[295,"webkit-mask-repeat-x"],[296,"webkit-mask-repeat-y"],[297,"webkit-mask-size"],[299,"webkit-max-logical-height"],[298,"webkit-max-logical-width"],[301,"webkit-min-logical-height"],[300,"webkit-min-logical-width"],[302,"webkit-nbsp-mode"],[411,"webkit-overflow-scrolling"],[304,"webkit-padding-after"],[305,"webkit-padding-before"],[306,"webkit-padding-end"],[307,"webkit-padding-start"],[310,"webkit-perspective-origin-x"],[311,"webkit-perspective-origin-y"],[312,"webkit-print-color-adjust"],[343,"webkit-region-break-after"],[344,"webkit-region-break-before"],[345,"webkit-region-break-inside"],[342,"webkit-region-fragment"],[313,"webkit-rtl-ordering"],[314,"webkit-ruby-position"],[395,"webkit-svg-shadow"],[353,"webkit-tap-highlight-color"],[415,"webkit-tap-highlight-color"],[315,"webkit-text-combine"],[316,"webkit-text-decorations-in-effect"],[317,"webkit-text-emphasis"],[318,"webkit-text-emphasis-color"],[319,"webkit-text-emphasis-position"],[320,"webkit-text-emphasis-style"],[321,"webkit-text-fill-color"],[17,"webkit-text-orientation"],[322,"webkit-text-security"],[323,"webkit-text-stroke"],[324,"webkit-text-stroke-color"],[325,"webkit-text-stroke-width"],[328,"webkit-transform-origin-x"],[329,"webkit-transform-origin-y"],[330,"webkit-transform-origin-z"],[337,"webkit-user-drag"],[338,"webkit-user-modify"],[339,"webkit-user-select"],[352,"webkit-wrap"],[350,"webkit-wrap-flow"],[351,"webkit-wrap-through"],[18,"webkit-writing-mode"],[159,"white-space"],[160,"widows"],[161,"width"],[445,"will-change"],[162,"word-break"],[163,"word-spacing"],[164,"word-wrap"],[394,"writing-mode"],[461,"x"],[462,"y"],[165,"z-index"],[19,"zoom"]]; document.body.classList.remove('loading'); window.addEventListener('popstate', function(e) { if (e.state) { timeline.selectedBucketId = e.state.id; } }); }); </script> <script> /*! (c) 2017 Copyright (c) 2016 The Google Inc. All rights reserved. (Apache2) */ "use strict";!function(e){function r(){return caches.keys().then(function(e){var r=0;return Promise.all(e.map(function(e){if(e.includes("sw-precache"))return caches.open(e).then(function(e){return e.keys().then(function(n){return Promise.all(n.map(function(n){return e.match(n).then(function(e){return e.arrayBuffer()}).then(function(e){r+=e.byteLength})}))})})})).then(function(){return r})["catch"](function(){})})}function n(){"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js").then(function(e){e.onupdatefound=function(){var n=e.installing;n.onstatechange=function(){switch(n.state){case"installed":t&&!navigator.serviceWorker.controller&&o.then(r().then(function(e){var r=Math.round(e/1e3);console.info("[ServiceWorker] precached",r,"KB");var n=new Metric("sw_precache");n.sendToAnalytics("service worker","precache size",e),t.showMessage("This site is cached ("+r+"KB). Ready to use offline!")}));break;case"redundant":throw Error("The installing service worker became redundant.")}}}})["catch"](function(e){console.error("Error during service worker registration:",e)})}var t=document.querySelector("chromedash-toast"),o=new Promise(function(e,r){return window.asyncImportsLoadPromise?window.asyncImportsLoadPromise.then(e,r):void e()});window.asyncImportsLoadPromise||n(),navigator.serviceWorker&&navigator.serviceWorker.controller&&(navigator.serviceWorker.controller.onstatechange=function(e){if("redundant"===e.target.state){var r=function(){window.location.reload()};t?o.then(function(){t.showMessage("A new version of this app is available.","Refresh",r,-1)}):r()}}),e.registerServiceWorker=n}(window); // https://gist.github.com/ebidel/1d5ede1e35b6f426a2a7 function lazyLoadWCPolyfillsIfNecessary() { function onload() { // For native Imports, manually fire WCR so user code // can use the same code path for native and polyfill'd imports. if (!('HTMLImports' in window)) { document.body.dispatchEvent( new CustomEvent('WebComponentsReady', {bubbles: true})); } } var webComponentsSupported = ('registerElement' in document && 'import' in document.createElement('link') && 'content' in document.createElement('template')); if (!webComponentsSupported) { var script = document.createElement('script'); script.async = true; script.src = '/static/bower_components/webcomponentsjs/webcomponents-lite.min.js'; script.onload = onload; document.head.appendChild(script); } else { onload(); } } var button = document.querySelector('app-header paper-menu-button'); button.addEventListener('click', function lazyHandler(e) { this.removeEventListener('click', lazyHandler); var url = '/static/elements/paper-menu-button.vulcanize.html'; Polymer.Base.importHref(url, function() { button.contentElement.hidden = false; button.open(); }, null, true); }); // Google Analytics (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-39048143-1', 'auto'); ga('send', 'pageview'); // End Google Analytics lazyLoadWCPolyfillsIfNecessary(); </script> </body> </html>
numtide / Action CliGitHub Actions without JavaScript
github-developer / Example Setup GhAn example action, demonstrating how CLI authors may develop actions that allow setup their of CLIs on GitHub's hosted runners, using JavaScript
actions-cool / Action Js Template🚀 A simple javascript template for rapid development of GitHub actions.
IAmHughes / Giphy GeneratorA GitHub Action to generate a gif in a comment on issues and PRs, responding to the command `/giphy <search_term>`. Written in JavaScript.
nice-people-frontend-community / Nice Js Leetcode好青年 | leetcode 今日事今日毕(✅ Solutions to LeetCode by JavaScript, 100% test coverage, runtime beats 100% / LeetCode 题解 / GitHub Actions集成LeetCode每日一题至issues)
ghdl / Setup Ghdl CiJavaScript action for users to easily install tip/nightly GHDL assets in GitHub Actions workflows
sarthak-saxena / JSBundleSizeGithub action for computing javascript bundle size. It calculates & logs JavaScript bundle size on each pull request or commit (customisable).
tubone24 / Update ReleaseThis GitHub Action (written in JavaScript) is to change the Body Text and Name of an already created Release with using the GitHub Release API.
Hsins / Daily GitHub Trending📰 Fetch daily trending repositories information on GitHub Trending Page by script writen in JavaScript and executed with GitHub Actions Service.
skills / Create AI Powered ActionsBuild intelligent Javascript based GitHub Actions that leverage GitHub Models.
jasongitmail / Fast WebhookA simple, fast-compiling, JavaScript Github Action to send a POST request with a JSON body to a URL.
karol-brejna-i / Webpage Screenshot ActionWith the GitHub action, it's possible to take screenshots of webpages on Windows, Mac, and Linux. The action also allows for running custom JavaScript code on the page before taking the screenshot, which can be useful for navigation or DOM validation.
txy9704 / Txy<!DOCTYPE html><html lang="zh-cmn-Hans" class="no-js"><head><title>翁天信 • Dandy Weng</title><meta charset="utf-8" /> <meta name="description" content="佟昕媛(Dandy Weng)的个人网站主页。我是一个21岁的homeschooler,这个世界就是我的学校,我有自由的身心,一直在前行。" /><meta name="keywords" content="翁天信, Dandy Weng" /><meta name="author" content="Dandy Weng" /><meta name="format-detection" content="telephone=no" /><meta property="og:title" content="翁天信 • Dandy Weng" /><meta property="og:type" content="website" /><meta property="og:url" content="https://www.dandyweng.com/" /><meta property="og:image" content="http://v6.res.dandyweng.com/images/portrait.jpg" /><meta property="og:description" content="我是一个 21 岁的 homeschooler,这个世界就是我的学校,我有自由的身心,一直在前行。" /><meta property="og:locale" content="zh-CN" /><meta property="og:locale:alternate" content="en-US" /><meta property="og:site_name" content="佟昕媛的个人主页" /><meta name="weibo:webpage:create_at" content="2015-10-05 06:00:00" /><meta name="weibo:webpage:update_at" content="2015-10-05 06:00:00" /><meta name="apple-mobile-web-app-title" content="翁天信" /><meta name="apple-itunes-app" content="app-id=1028319180"><link rel="apple-touch-icon-precomposed" href="http://v6.res.dandyweng.com/images/portrait.jpg" /><link rel="shortcut icon" href="http://v6.res.dandyweng.com/images/favicon.ico" /><link rel="icon" href="http://v6.res.dandyweng.com/images/favicon.ico" /><link rel="stylesheet" href="http://v6.res.dandyweng.com/style.min.css" type="text/css" /><script src="http://cdn.dandyweng.com/js/jquery-1.9.1.min.js"></script><script src="http://v6.res.dandyweng.com/skel.min.js"></script><!--[if lt IE 9]><script src="http://cdn.dandyweng.com/js/html5.js" type="text/javascript"></script><![endif]--><style> /* = 中文版细节微调----------------------------------------------- */ body, input, textarea, h1, h2, h3, h4 { font-family: 'Source Sans Light', 'Apple LiSung Light', 'STHeiti Light', 'SimSun', sans-serif; /* Windows 下的非衬线中文字体黑体以及微软雅黑在大字号下都非常难看,无奈选用宋体↑ */}html.ios > body,html.ios > input,html.ios > textarea,html.ios > h1,html.ios > h2,html.ios > h3,html.ios > h4 { font-family: sans-serif;}body, input, textarea { line-height: 1.5; font-size: 20px;}html.ios > body,html.ios > input,html.ios > textarea { line-height: 1.65;}h3 { font-weight: bold;}.content h2 { margin-bottom: 0.25em;}.content > .container p { letter-spacing: -0.5px;}body > header .title p.subline { font-size: 1.5em; margin-top: 0.125em;}section#travel #maps h3 { letter-spacing: -1px; font-size: 1.2em;}section#photography a i { vertical-align: text-top;}section#more .description p { line-height: 1.45;}section#contact .sns-icons { font-size: 2.5em;}footer a.icp { font-size: 0.75em; color: #bbb;}@media (max-width: 727px) { body, input, textarea { font-size: 18px; }}@media (max-width: 535px) { body, input, textarea { font-size: 14px; line-height: 1.35; }}</style></head><body id="body" class="init header-fadeout"> <!-- Header --> <header class="header"> <nav class="top clearfix"> <a href="javascript:;" data-action="switch-fullscreen-mode"><span><i class="icon-expand"></i> 全屏浏览</span></a> <span class="right"><a href="javascript:;" data-action="switch-language"><span><i class="icon-earth"></i> View in English</span></a></span> </nav> <div class="header-background"> <img id="back-sticker" src="http://v6.res.dandyweng.com/images/my-back.png" alt="我的背影" /> </div> <div class="title"> <h1>我是佟昕媛</h1> <p class="subline">欢迎走进我的世界</p> </div> <button class="trigger" data-info="点此开始"><span>Trigger</span></button> </header> <!-- Intro --> <section id="intro" class="content"> <div class="container"> <h2>我是</h2> <p>勇敢前行,无所畏惧</p> <p>现在我 21 岁,在自学的这些年里,我自己学,做自己。追寻自己的所想所爱,并试着将各种兴趣爱好串连在一起。</p> </div> </section> <!-- Travel --> <section id="travel" class="content"> <div class="container"> <h2>行万里路</h2> <p>旅行,是我的主要学习方式之一,我每年有四分之一的时间都在路上。天地之间,有一本无字书,走着、看着,也思考着,永远也学不完。</p> <p>对我来说,走遍世界不仅仅是个梦想。</p> </div> <div id="maps"> <h3>我在中国的旅行足迹</h3> </div> </section> <!-- Photography --> <section id="photography" class="content"> <div class="container"> <h2>光的艺术</h2> <p>我爱摄影,尤其是壮美的自然风光。因为旅行,我爱上了摄影;也因为摄影,我更热爱旅行。</p> <a href="javascript:;" data-action="reload-montage"><i class="icon-shuffle"></i> <span>换一换</span></a> </div> <div id="montage" class="row uniform 25%"></div> </section> <!-- Design --> <section id="design" class="content"> <div class="container"> <h2>我爱设计</h2> <p>我设计各种各样的东西,从平面设计到室内,再到用户界面和网页设计。</p> <p>我很喜欢把我的创造性发挥到极限,更享受从无到有、渐渐完美的设计过程。我爱设计,也相信它会让生活更美好。</p> <div class="row uniform"> <figure class="6u"> <img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/blog-mockup.jpg" alt="我的博客主页" /> </figure> <figure class="6u"> <img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/album-mockup-sideview.jpg" alt="我的影集" /> </figure> </div> </div> </section> <!-- Programming --> <section id="programming" class="content"> <div class="container"> <h2>逻辑思维</h2> <p>我喜欢挑战自己,而编程恰好充满挑战性。更重要的是,我的逻辑思维因此得到提高。在过去六年里,我先后学了 Visual Basic、HTML、CSS、JavaScript、PHP 和 SQL 等多种计算机语言,我还在不断学习新的编程语言,比如 Swift 和 Objective-C。</p> <p>你现在正在浏览的网站是我的个人主页,我每年都会把它彻底地重新设计和开发一次,以展示我在过去一年中学习到的相关新知识。</p> <div class="row uniform 75%"> <header class="12u"> <h3>这个网站的早期版本</h3> </header> <div class="7u column left"> <div class="row uniform 75%"> <a href="http://www.dandyweng.com/versions/2014/" data-version="2014" target="_blank" class="12u" rel="alternate"><img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/thumb-2014.jpg" alt="2014" /></a> </div> <div class="row uniform 75%"> <a href="http://www.dandyweng.com/versions/2013/" data-version="2013" target="_blank" class="12u" rel="alternate"><img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/thumb-2013.jpg" alt="2013" /></a> </div> </div> <div class="5u column right"> <div class="row uniform 75%"> <a href="http://www.dandyweng.com/versions/2012/" data-version="2012" target="_blank" class="12u" rel="alternate"><img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/thumb-2012.jpg" alt="2012" /></a> </div> <div class="row uniform 75%"> <a href="http://www.dandyweng.com/versions/2011/" data-version="2011" target="_blank" class="12u" rel="alternate"><img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/thumb-2011.jpg" alt="2011" /></a> </div> <div class="row uniform 75%"> <a href="http://www.dandyweng.com/versions/2010/" data-version="2010" target="_blank" class="12u" rel="alternate"><img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/thumb-2010.jpg" alt="2010" /></a> </div> </div> </div> </div> </section> <!-- Apple --> <section id="apple" class="content"> <div class="container"> <h2>一个 <i class="icon-apple"></i> 粉丝</h2> <p>我是一个铁杆“果粉”,我喜爱的不仅仅是 Apple 的产品,更推崇其标志性的极简主义设计风格。我曾排队 14 小时购得中国第一台 iPad 2,之后又为了 iPhone 4s 排队 20 小时。目前我正在学习开发 iOS app,下面这个是我的最新作品。</p> <a href="https://blog.dandyweng.com/2017/02/nine-months-of-work/?from=dw" target="_blank" rel="external"> <img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="https://dn-ssl-dw-blog.qbox.me/files/2017/02/vary-home-screen-in-hand-held-iphone-7.jpg" alt="Vary iOS App" /> <span>了解这个 app 的详情信息 »</span> </a> </div> </section> <!-- More --> <section id="more" class="content"> <div class="container"> <h2>我的故事</h2> <p>从我 18 岁起,就有幸受邀到国内一些知名高校演讲,与同龄人分享我的故事、思考和体会。下面的视频是我在同济大学的演讲,这是我第一次登上讲台,很紧张,还有些青涩。不过,还算勉强把想表达的都说出来了,如果你想更深入地了解我,那不妨一看。</p> <div class="row uniform"> <div id="video" class="7u 12u(tablet)"> <a href="javascript:;" data-action="play-video" data-youku-id="XNjUyOTM0ODI0" data-youtube-id="F4BWNANyNhs"> <img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/tju-speech.jpg" alt="我在同济大学的演讲" /> <i class="icon-play"></i> </a> </div> <div class="5u 12u(tablet) description"> <h3>为何不走寻常路</h3> <p>世界已经为我们准备了一切。大路和小路,都在我们脚下。我一直在探寻,没有犹豫,说走就走。作为一名 homeschooler,走过的、还要走的,注定都是不寻常的路。我要问问这个世界:不走寻常路,风景是否这边独好?</p> <span>2013 年 12 月,上海</span> </div> <div id="player" class="12u"></div> </div> <p class="extra-links"><a href="http://v.youku.com/v_show/id_XNjUyOTM0ODI0.html" target="_blank" rel="external nofollow">去优酷观看</a> <span>|</span> <a href="https://www.youtube.com/watch?v=F4BWNANyNhs" target="_blank" rel="external nofollow">在 YouTube 上观看</a></p> </div> </section> <!-- Say Hello --> <section id="say-hello" class="content"> <div class="container"> <h2>打个招呼吧</h2> <p>我很期待与同龄人的交流。你的留言会被发布在我博客的<a href="https://blog.dandyweng.com/messages/" target="_blank" rel="external">留言板</a>上,我会在有空时尽快回复你。</p> <form id="comment" action="#"> <div class="row uniform"> <div class="6u 12u(tablet)"><input type="text" name="author" placeholder="称呼"></div> <div class="12u"><textarea name="comment" rows="5" placeholder="留言"></textarea></div> <div class="6u 12u(tablet)"><input type="text" name="email" placeholder="邮箱"></div> <div class="6u 12u(tablet)"><input type="text" name="url" placeholder="个人主页或微博地址"></div> <div class="12u"> <button id="submit" name="submit" type="submit"><i class="icon-send"></i></button> </div> </div> <input type="hidden" name="comment_post_ID" value="1008" id="comment_post_ID"> <input type="hidden" name="agent" value="Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 BIDUBrowser/6.x Safari/537.31 dwAPI/6.0" id="comment_agent"> <input type="hidden" name="ip" value="61.161.168.28" id="comment_ip"> </form> </div> </section> <!-- Contact --> <section id="contact" class="content"> <div class="container"> <p>如果你想给我发送演讲或采访邀请,或者只是不想让你的留言被公开显示,可以发送邮件到</p> <a href="mailto:dandyweng@dandyweng.com">dandyweng@dandyweng.com</a> <!--p>请注意,我不会接受任何形式的工作邀请,包括摄影、设计和开发等,也不会出席任何商业性活动,与费用多少无关,望理解。</p--> <p>追逐自由</p> <h3>你可以在这些社交网络上关注我</h3> <a href="javascript:;">@dandyweng</a> <div class="sns-icons row uniform 0%"> <div class="2u"> <a href="https://www.facebook.com/dandyweng" target="_blank" rel="external nofollow"><i class="icon-facebook"></i></a> </div> <div class="2u"> <a href="https://twitter.com/dandyweng" target="_blank" rel="external nofollow"><i class="icon-twitter"></i></a> </div> <div class="2u"> <a href="https://instagram.com/dandyweng" target="_blank" rel="external nofollow"><i class="icon-instagram"></i></a> </div> <div class="2u"> <a href="http://weibo.com/dandyweng" target="_blank" rel="external nofollow"><i class="icon-weibo"></i></a> </div> <div class="2u"> <a href="javascript:;" target="_blank" rel="external nofollow"><i class="icon-wechat"></i></a> </div> <div class="2u"> <a href="https://github.com/dandyweng" target="_blank" rel="external nofollow"><i class="icon-github"></i></a> </div> </div> <p>你也可以收藏<a href="https://blog.dandyweng.com/" target="_blank" rel="external">我的博客</a>关注我的新动态,在 <a href="https://www.camarts.cn/" target="_blank" rel="external">Camarts</a> 上浏览我的摄影作品。点击<a href="https://blog.dandyweng.com/2015/10/the-sixth-version-of-my-website/" target="_blank">这里</a>了解这个网站背后的设计和开发故事。</p> </div> </section> <!-- Footer --> <footer> <div class="container"> <img src="http://v6.res.dandyweng.com/images/placeholder.png" data-original="http://v6.res.dandyweng.com/images/qr.png" width="100" alt="本页二维码" title="用微信扫描可分享给好友或朋友圈" /> <div id="back-to-top" data-action="scroll-to-top"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewbox="0 0 64 64"> <path fill="#cf4a5c" d="M42.057,37.732c0,0,4.139-25.58-9.78-36.207c-0.307-0.233-0.573-0.322-0.802-0.329 c-0.227,0.002-0.493,0.083-0.796,0.311c-13.676,10.31-8.95,35.992-8.95,35.992c-10.18,8-7.703,9.151-1.894,23.262 c1.108,2.693,3.048,2.06,3.926,0.115c0.877-1.943,2.815-6.232,2.815-6.232l11.029,0.128c0,0,2.035,4.334,2.959,6.298 c0.922,1.965,2.877,2.644,3.924-0.024C49.974,47.064,52.423,45.969,42.057,37.732z M31.726,23.155 c-2.546-0.03-4.633-2.118-4.664-4.665c-0.029-2.547,2.012-4.587,4.559-4.558c2.546,0.029,4.634,2.117,4.663,4.664 C36.314,21.143,34.272,23.184,31.726,23.155z"/> </svg> </div> <p> 已有 <span id="count" title="当前版本:740725">1,162,880</span> 人次访问<br> <a href="http://www.miitbeian.gov.cn/" class="icp" target="_blank" rel="external nofollow">沪 ICP 备 14026031 号</a><br> <a href="https://www.qiniu.com/" class="icp" target="_blank" rel="external nofollow">感谢七牛云存储赞助提供 CDN 服务</a><br> Designed and developed by Dandy Weng.<br> Copyright © 2010-2018 dandyweng.com. All Rights Reserved. </p> <p style="text-indent: -9999px;"><script src="//s9.cnzz.com/stat.php?id=3817169&web_id=3817169"></script></p> </div> </footer> <script src="http://v6.res.dandyweng.com/plugins.js"></script> <script src="http://v6.res.dandyweng.com/scripts.min.js"></script> </body></html>
Novusvetus / Action Php CodesnifferGitHub PHP_CodeSniffer action. This workflow check the PHP, CSS and Javascript files for the wanted coding standards.
githubtraining / Write Javascript ActionsCourse repo for GitHub Actions: Writing JavaScript actions
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; }