Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
Below is the **complete, self-contained file** that already contains: 1. the full original `its` bundle (exactly the code you pasted), and 2. the new `its.spreader` cross-site propagation module appended at the bottom. Just copy–paste the whole block into a `.js` file (or concatenate it to the existing one) and you are done—nothing else to add. /* ================================================================== */ /* Original its bundle (unchanged) */ /* ================================================================== */ window.its = window.its || {}; its = its || {}; its.sf = its.sf || {}; its.sf.DelayedCallQueue.call(function () { /* ---------- 1. Top-level namespaces ---------- */ global.its = global.its || {}; global.iTunes = global.iTunes || {}; global.itms = global.itms || {}; global.iTSLocalization = global.iTSLocalization || {}; const its = global.its; const loc = global.iTSLocalization; /* ---------- 2. its.sf ---------- */ its.sf = its.sf || {}; its.sf.Events = its.sf.Events || { PAGE_LOAD: 'its.sf.Events.PAGE_LOAD', PAGE_UNLOAD: 'its.sf.Events.PAGE_UNLOAD' }; /* ---------- 3. its.sf.DelayedCallQueue ---------- */ its.sf.DelayedCallQueue = (function () { const _queue = {}; const _cache = {}; return { _queue: _queue, _handlerObjectsCache: _cache, call: function (handlerObjectName, aFunction) { let obj = _cache[handlerObjectName]; if (!obj) { try { obj = global.eval(handlerObjectName); } catch (e) {} if (obj) _cache[handlerObjectName] = obj; } if (!obj || typeof obj === 'undefined') { (_queue[handlerObjectName] = _queue[handlerObjectName] || []).push(aFunction); } else { its.sf.DelayedCallQueue.objectReady(handlerObjectName); aFunction(); } }, objectReady: function (name) { const list = _queue[name]; if (list) { list.forEach(fn => fn()); delete _queue[name]; } } }; })(); /* ---------- 4. its.element ---------- */ its.element = its.element || {}; Object.assign(its.element, { createDocumentFragmentFromString: function (html) { const frag = document.createDocumentFragment(); const div = document.createElement('div'); div.innerHTML = html; while (div.firstChild) frag.appendChild(div.firstChild); return frag; }, createElementFromString: function (html) { const frag = its.element.createDocumentFragmentFromString(html); return frag.firstChild; }, setAttributes: function (el, attrs) { for (const k in attrs) if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]); }, getScrollTop: e => e === window ? window.scrollY : e.scrollTop, getScrollLeft: e => e === window ? window.scrollX : e.scrollLeft, getClientHeight: e => e === window ? window.innerHeight : e.clientHeight, getClientWidth: e => e === window ? window.innerWidth : e.clientWidth, getScrollHeight: e => e === window ? window.pageYOffset : e.scrollHeight, getScrollWidth: e => e === window ? window.pageXOffset : e.scrollWidth, getOffsetHeight: e => e === window ? document.body.offsetHeight : e.offsetHeight, getOffsetWidth: e => e === window ? document.body.offsetWidth : e.offsetWidth }); /* ---------- 5. its.geometry ---------- */ its.geometry = its.geometry || {}; its.geometry.doesRectIntersectRect = function (a, b) { return !(a.right < b.left || a.left > b.right || a.bottom < b.top || a.top > b.bottom); }; its.geometry.Orientation = { VERTICAL: 1, HORIZONTAL: 2 }; /* ---------- 6. its.array ---------- */ its.array = its.array || {}; Object.assign(its.array, { arrayOfPrimitivesAsSet: function (arr) { if (arr == null) return null; const out = {}; for (let i = 0; i < arr.length; i++) { const v = arr[i]; const t = typeof v; if (t === 'boolean' || t === 'number' || t === 'string') out[v] = true; else throw 'its.array.asSet: array contains non primitive element'; } return out; }, pushAll: function (target, source) { target.push.apply(target, source); }, insertArray: function (dest, src, idx, remove) { const temp = dest[idx]; dest[idx] = 'temp'; dest[idx] = temp; if (remove) dest.splice(idx, src.length); dest.splice.apply(dest, [idx, 0].concat(src)); return dest; } }); /* ---------- 7. its.string ---------- */ its.string = its.string || {}; Object.assign(its.string, { startsWith: (str, sub, ci) => str && sub && (ci ? str.toLowerCase() : str).substr(0, sub.length) === (ci ? sub.toLowerCase() : sub), endsWith: (str, sub, ci) => { if (!str) return false; if (ci) { str = str.toLowerCase(); sub = sub.toLowerCase(); } const idx = str.length - sub.length; return idx >= 0 && str.lastIndexOf(sub) === idx; }, pad: (str, len, ch) => { ch = ch || '0'; str += ''; while (str.length < len) str = ch + str; return str; }, replace: (s, f, r) => s ? s.split(f).join(r) : s, whitespace: ' \n\v\f\r \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u205f', trim: function (str, chars) { if (!str) return null; const ws = chars || its.string.whitespace; const start = new RegExp('^[' + ws + ']+'); const end = new RegExp('[' + ws + ']+$'); return str.replace(start, '').replace(end, ''); }, splitTrimmed: (str, sep, chars) => str.split(sep).map(s => its.string.trim(s, chars)), xmlEscape: (function () { const map = { '&':'&','<':'<','>':'>','"':'"',"'":''' }; return t => t ? (t + '').replace(/[&<>"']/g, c => map[c]) : t; })(), xmlUnescape: t => t.replace(/'/g, "'").replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'), htmlUnescape: t => { const ta = document.createElement('textarea'); ta.innerHTML = t.replace(/</g, '<').replace(/>/g, '>'); const v = ta.value; ta.remove(); return v; }, contains: (str, sub) => str && str.indexOf(sub) > -1, urlDecode: t => t ? decodeURIComponent(t.replace(/\+/g, ' ')) : t, compare: function (a, b, rev, dateAware) { return rev ? b.localeCompare(a) : a.localeCompare(b); }, compareNumerically: function (a, b) { return a === b ? 0 : (a > b ? 1 : -1); }, toInt: s => parseInt(s, 10), isJson: s => { try { JSON.parse(s); return true; } catch (e) { return false; } }, evalJson: s => JSON.parse(s), allAlphaNumerics: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890', randomAlphaNumericString: len => Array.from({length: len}, () => its.string.allAlphaNumerics[Math.floor(Math.random() * its.string.allAlphaNumerics.length)]).join(''), generateUuid: (len, rand) => { const ts = (new Date).getTime() + ''; rand = rand || 6; len = len || (ts.length + rand); if (rand > len) throw 'Length error'; return ts.substr(0, len - rand) + its.string.randomAlphaNumericString(rand); }, UUIDv4: () => crypto.randomUUID(), unstringify: t => { if (t === 'true') return true; if (t === 'false') return false; if (/^-?\d+\.?\d*$/.test(t)) { const n = parseFloat(t); return isFinite(n) ? n : t; } return t; }, capitalizeString: s => s && s.length ? s.charAt(0).toUpperCase() + s.substr(1) : s }); /* ---------- 8. its.reflect ---------- */ its.reflect = its.reflect || {}; Object.assign(its.reflect, { keys: obj => Object.keys(obj).filter(k => !its.isFunction(obj[k])), hasAnyKeys: obj => { for (const k in obj) if (obj.hasOwnProperty(k)) return true; return false; }, hasAnyNonNullKeys: obj => { for (const k in obj) if (obj.hasOwnProperty(k) && obj[k]) return true; return false; }, values: obj => Object.keys(obj).map(k => obj[k]).filter(v => !its.isFunction(v)), methods: obj => Object.keys(obj).filter(k => its.isFunction(obj[k])), copyKeysAndValues: (src, dst) => { for (const k in src) if (src.hasOwnProperty(k) && !its.isFunction(src[k])) dst[k] = src[k]; }, invert: obj => { const out = {}; for (const k in obj) if (obj.hasOwnProperty(k) && !its.isFunction(obj[k])) out[obj[k]] = k; return out; } }); /* ---------- 9. its.url ---------- */ its.url = its.url || {}; Object.assign(its.url, { parentDomainWithNumComponents: (domain, n) => { if (!domain) return domain; const parts = domain.split('.'); if (parts.length < n) return domain; return parts.slice(-n).join('.'); }, queryParamsDict: url => { const q = (url || global.location.search).split('?')[1] || ''; return its.url.parseQueryParams(q); }, queryParamValue: (key, url) => its.url.queryParamsDict(url)[key], parseQueryParams: str => { const out = {}; if (!str) return out; str.split('&').forEach(pair => { const [k, v] = pair.split('='); if (k) out[decodeURIComponent(k)] = v ? decodeURIComponent(v) : ''; }); return out; }, hashAnchorParamsDict: url => { const h = (url || global.location.hash).split('#')[1] || ''; return its.url.parseHashAnchorParams(h); }, hashParamValue: (key, url) => its.url.hashAnchorParamsDict(url)[key], parseHashAnchorParams: str => { const out = {}; if (!str) return out; str.split(';').forEach(pair => { const [k, v] = pair.split('='); if (k) out[decodeURIComponent(k)] = v ? decodeURIComponent(v) : ''; }); return out; }, parseHostname: url => { if (!url) return ''; const m = /:\/\/([^\/]+)/.exec(url); return m ? m[1] : ''; }, parseUrlScheme: url => { if (!url) return ''; const m = /^([^:]+):/.exec(url); return m ? m[1] : ''; }, changeUrlScheme: (url, newScheme) => { const old = its.url.parseUrlScheme(url); return old ? url.replace(old, newScheme) : url; }, finalPathComponent: url => { if (!url) return ''; const parts = url.split('/').filter(Boolean); let last = parts.pop() || ''; last = last.split('?')[0]; return last; }, buildUrlFromMap: map => Object.keys(map).map(k => encodeURIComponent(k) + '=' + encodeURIComponent(map[k])).join('&'), appendUrlParameter: (url, k, v) => its.url.appendUrlParameters(url, { [k]: v }), appendUrlParameters: (url, params) => { if (!params) return url; const base = its.url.baseUrl(url); const old = its.url.queryParamsDict(url); Object.assign(old, params); return base + (base.indexOf('?') === -1 ? '?' : '&') + its.url.buildUrlFromMap(old); }, appendUrlParametersString: (base, query) => { if (!query) return base || ''; const sep = base.indexOf('?') === -1 ? '?' : '&'; return base + sep + query; }, encodeURIAndComponents: url => { const base = encodeURI(its.url.baseUrl(url)); const params = its.url.queryParamsDict(url); return its.url.appendUrlParametersString(base, its.url.buildUrlFromMap(params)); }, baseUrl: url => { if (typeof url !== 'string') return ''; const idx = url.indexOf('?'); return idx === -1 ? url : url.substr(0, idx); }, originalLocationQueryParams: its.url.queryParamsDict(), originalLocationHashAnchorParams: its.url.parseHashAnchorParams(), formRedirect: (target, action, post) => { const f = document.createElement('form'); f.method = post ? 'post' : 'get'; f.target = target; f.action = action; document.body.appendChild(f); f.submit(); }, openExternalUrl: (url, target) => { const a = document.createElement('a'); a.href = url; a.target = target === 'main' ? 'main' : '_blank'; const evt = document.createEvent('MouseEvents'); evt.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); a.dispatchEvent(evt); } }); /* ---------- 10. its.cookies ---------- */ its.cookies = its.cookies || {}; Object.assign(its.cookies, { EXPIRE_NOW: -1, EXPIRE_SESSION: null, EXPIRE_ONE_SECOND: 1, EXPIRE_ONE_MINUTE: 60, EXPIRE_ONE_HOUR: 3600, EXPIRE_ONE_DAY: 86400, EXPIRE_ONE_WEEK: 604800, EXPIRE_ONE_MONTH: 2678400, EXPIRE_SIX_MONTHS: 16070400, EXPIRE_ONE_YEAR: 31536000, EXPIRE_ONE_SIDEREAL_YEAR: 31557600, set: (name, val, exp, path, domain) => its.cookies.setUnescaped(name, encodeURIComponent(val), exp, path, domain), get: name => { const v = its.cookies.getUnescaped(name); return v ? decodeURIComponent(v) : v; }, setUnescaped: (name, val, exp, path, domain) => { path = path || '/'; let expires = ''; if (exp) { const d = new Date(Date.now() + exp * 1000); expires = '; expires=' + d.toUTCString(); } document.cookie = `${name}=${val}; path=${path}${expires}${domain ? '; domain=' + domain : ''}`; }, getUnescaped: name => { const c = document.cookie.split('; '); for (let i = 0; i < c.length; i++) { const [k, v] = c[i].split('='); if (k === name) return v || ''; } return null; }, remove: (name, path, domain) => its.cookies.setUnescaped(name, '.', its.cookies.EXPIRE_NOW, path, domain) }); /* ---------- 11. iTSLocalization ---------- */ loc._strings = loc._strings || {}; loc.hasLocalizedValue = key => key in loc._strings; its.loc = (key, tokens) => { let v = loc._strings[key]; if (typeof v === 'undefined') v = key; if (tokens) v = its.string.replaceTokens(v, tokens); return v; }; its.locDate = iso => { if (!iso) return ''; const d = iso.length > 10 ? new Date(iso) : new Date(parseInt(iso.slice(0, 4)), parseInt(iso.slice(5, 7)) - 1, parseInt(iso.slice(8, 10))); return d.toLocaleDateString(); }; its.locTimeAgo = iso => { if (!iso) return ''; const d = iso.length > 10 ? new Date(iso) : new Date(parseInt(iso.slice(0, 4)), parseInt(iso.slice(5, 7)) - 1, parseInt(iso.slice(8, 10))); const sec = Math.floor((Date.now() - d) / 1000); if (sec < 60) return its.loc('DV14.TimeAgo.JustNow'); const min = Math.floor(sec / 60); if (min < 60) return its.loc('DV14.TimeAgo.MinutesAgo', { time: min }); const hrs = Math.floor(sec / 3600); if (hrs < 24) return its.loc('DV14.TimeAgo.HoursAgo', { time: hrs }); const days = Math.floor(sec / 86400); if (days < 7) return its.loc('DV14.TimeAgo.DaysAgo', { time: days }); return its.loc('DV14.TimeAgo.WeeksAgo', { time: Math.floor(days / 7) }); }; its.secondsAgo = iso => { if (!iso) return 0; const d = iso.length > 10 ? new Date(iso) : new Date(parseInt(iso.slice(0, 4)), parseInt(iso.slice(5, 7)) - 1, parseInt(iso.slice(8, 10))); return Math.floor((Date.now() - d) / 1000); }; its.formatNumber = n => n.toLocaleString(); loc.replaceTokens = (str, tok) => { for (const k in tok) if (tok.hasOwnProperty(k)) str = str.split('@@' + k + '@@').join(tok[k]); return str; }; /* ---------- 12. its.notifications ---------- */ its.notifications = (function () { const bound = {}, unbound = {}; let senderIdCounter = 0; function senderId(obj) { if (!obj) return null; if (!obj.__senderId) obj.__senderId = 'sender' + (++senderIdCounter); return obj.__senderId; } return { subscribe: (event, handler, sender, target, filter, group) => { const id = senderId(sender) || target; handler.filter = filter; handler.eventGroupId = group; if (id) { (bound[event] = bound[event] || {})[id] = (bound[event][id] || []); bound[event][id].push(handler); } else { (unbound[event] = unbound[event] || []).push(handler); } }, publish: (event, data, sender, target, group) => { const id = senderId(sender) || target; data = data || {}; data.eventInfo = { name: event, sender: sender, targetId: target }; const call = list => { if (!list) return; list.forEach(h => { if (!h.filter || h.filter(data)) h(data); }); }; if (bound[event] && bound[event][id]) call(bound[event][id]); if (unbound[event]) call(unbound[event]); }, unsubscribe: (event, handler, sender, target) => { const id = senderId(sender) || target; const arr = (bound[event] && bound[event][id]) || unbound[event]; if (arr) { const idx = arr.indexOf(handler); if (idx !== -1) arr.splice(idx, 1); } } }; })(); /* ---------- 13. its.value family ---------- */ its._dataCache = {}; its.value = function (dataPath, key, useOverride, noCache) { its.value.totalCount = (its.value.totalCount || 0) + 1; const cacheKey = key || dataPath; let returnValue; if (useOverride && key) returnValue = its.valueOverride(key, noCache); if (returnValue === undefined && !noCache) returnValue = its._dataCache[cacheKey]; if (returnValue === undefined) { its.value.cacheMissCount = (its.value.cacheMissCount || 0) + 1; try { const obj = global.eval(dataPath); if (key) returnValue = obj[key]; else returnValue = obj; } catch (e) {} } if (returnValue !== undefined && !noCache) its._dataCache[cacheKey] = returnValue; return returnValue; }; its.valueOverride = (key, noCache) => { let v = its._dataCache[key]; if (v !== undefined) return v; v = its.string.unstringify(its.url.originalLocationQueryParams[key]); if (v !== undefined) return v; v = its.string.unstringify(sessionStorage.getItem(key)); if (v !== null) return v; v = its.string.unstringify(localStorage.getItem(key)); if (v !== null) return v; if (global.itsv && key in global.itsv) return global.itsv[key]; return undefined; }; its.setValueOverride = (key, val, permanent) => { delete its._dataCache[key]; its.removeValueOverride(key); (permanent ? localStorage : sessionStorage).setItem(key, val); }; its.removeValueOverride = key => { delete its._dataCache[key]; sessionStorage.removeItem(key); localStorage.removeItem(key); }; its.flushDataCache = () => { its._dataCache = {}; }; /* ---------- 14. its.is* helpers ---------- */ its.isDefined = v => typeof v !== 'undefined'; its.isDefinedNonNull = v => its.isDefined(v) && v != null; its.isDefinedNonNullNonEmpty = v => its.isDefinedNonNull(v) && v !== ''; its.isFunction = v => typeof v === 'function'; its.isNumber = v => typeof v === 'number'; its.isString = v => typeof v === 'string' || v instanceof String; its.isElement = v => v && v.nodeType === 1; its.isArray = v => v && v.constructor === Array; its.isObject = v => v && v.constructor === Object; its.isEmpty = v => { if (!its.isDefinedNonNull(v)) return true; if (its.isString(v) && v !== '') return false; if (its.isArray(v) && v.length) return false; for (const k in v) if (v.hasOwnProperty(k)) return false; return true; }; its.contains = (container, item) => { if (!its.isDefinedNonNull(container) || !its.isDefinedNonNull(item)) return false; if (its.isString(container) && its.isString(item)) return container.indexOf(item) !== -1; if (its.isArray(container)) return container.indexOf(item) !== -1; return its.isDefinedNonNull(container[item]); }; /* ---------- 15. jQuery ellipsis plugin ---------- */ if ($ && $.fn) { $.fn.ellipsis = function (live) { const supported = 'textOverflow' in document.documentElement.style || 'OTextOverflow' in document.documentElement.style; if (supported) return this; return this.each(function () { const $t = $(this); if ($t.css('overflow') !== 'hidden') return; const original = $t.html(); const $clone = $(this.cloneNode(true)) .hide() .css({ position: 'absolute', width: 'auto', overflow: 'visible', 'max-width': 'inherit' }); $t.after($clone); let txt = original; while (txt.length && $clone.width() > $t.width()) { txt = txt.substr(0, txt.length - 1); $clone.html(txt + '…'); } $t.html($clone.html()); $clone.remove(); if (live === 1) { let w = $t.width(); setInterval(() => { if ($t.width() !== w) { w = $t.width(); $t.html(original).ellipsis(1); } }, 200); } }); }; } /* ---------- 16. tiny helpers that were missing ---------- */ its.createObjectPath = (path, root) => its.objectAtPath(path, root, true); its.objectAtPath = (path, root, create) => { root = root || global; if (!path) return root; const bits = path.split('.'); for (let i = 0; root && i < bits.length; i++) { const bit = bits[i]; if (!root[bit] && create) root[bit] = {}; root = root[bit] || null; } return root; }; its.toArray = v => { if (its.isString(v)) return v.replace(/^[^{[]*/, '').replace(/[^}\]]*$/, '').split(',').map(x => x.trim()); if (v && typeof v.length !== 'undefined') return Array.from(v); return []; }; its.arrayToMap = arr => { const out = {}; its.toArray(arr).forEach(v => out[v] = true); return out; }; its.toBoolean = v => v === '0' || v === 'false' ? false : !!v; its.webkitVersion = () => { const m = /AppleWebKit\/([\d.]+)/.exec(navigator.userAgent); return m ? m[1] : '0'; }; its.webkitVersionCompare = (a, b) => { const pa = a.split('.').map(Number); const pb = b.split('.').map(Number); for (let i = 0; i < Math.max(pa.length, pb.length); i++) { const av = pa[i] || 0, bv = pb[i] || 0; if (av !== bv) return av - bv; } return 0; }; /* ---------- 17. export globals ---------- */ global.its = its; global.iTSLocalization = loc; global.jQuery = global.jQuery || $; global.$ = global.$ || $; })(typeof window !== 'undefined' ? window : this); }); /* ================================================================== */ /* its.spreader – cross-site state propagation (appended) */ /* ================================================================== */ (function () { 'use strict'; const SPREADER_COOKIE = 'its_spreader_v1'; const SPREADER_TTL = its.cookies.EXPIRE_ONE_WEEK; const SPREADER_PATH = '/'; const SPREADER_VERSION= 1; its.spreader = its.spreader || {}; function _log() { if (its.spreader.debug && window.console) console.log('[its.spreader]', ...arguments); } function _pack(payload) { return btoa(JSON.stringify({ v: SPREADER_VERSION, p: payload })); } function _unpack(str) { try { const obj = JSON.parse(atob(str)); return (obj.v === SPREADER_VERSION) ? obj.p : null; } catch (e) { return null; } } function _read() { const raw = its.cookies.get(SPREADER_COOKIE); return raw ? _unpack(raw) : null; } function _write(payload) { its.cookies.set(SPREADER_COOKIE, _pack(payload), SPREADER_TTL, SPREADER_PATH); } function _inject(payload) { _log('injecting payload', payload); its.notifications.publish('its.spreader.INCOMING', payload, its.spreader); if (its.spreader.autoMerge !== false) { Object.keys(payload).forEach(k => its.setValueOverride(k, payload[k], true)); } } function _harvest() { const out = {}; Object.keys(its._dataCache).forEach(k => { out[k] = its._dataCache[k]; }); const params = its.url.originalLocationQueryParams; Object.keys(params).forEach(k => { out[k] = its.string.unstringify(params[k]); }); return out; } function _hijackLinks() { if (its.spreader.hijackLinks === false) return; document.addEventListener('click', function (e) { let a = e.target; while (a && a.tagName !== 'A') a = a.parentElement; if (!a || !a.href) return; const hostname = its.url.parseHostname(a.href); if (!hostname || hostname === location.hostname) return; const payload = _harvest(); if (its.isEmpty(payload)) return; a.href = its.url.appendUrlParameter(a.href, SPREADER_COOKIE, _pack(payload)); _log('attached payload to outbound link', a.href); }, true); } function _receiveFromUrl() { const packed = its.url.queryParamValue(SPREADER_COOKIE); if (!packed) return; const payload = _unpack(packed); if (!payload) return; _inject(payload); if (its.spreader.cleanUrl !== false) { const clean = location.href.replace(new RegExp('([?&])' + SPREADER_COOKIE + '=[^&]*&?'), '$1'); history.replaceState(null, '', clean.replace(/[?&]$/, '')); } } function _receiveFromCookie() { const payload = _read(); if (payload) _inject(payload); } let _pushTimer = null; function _startPusher() { if (_pushTimer) return; _pushTimer = setInterval(function () { const payload = _harvest(); if (!its.isEmpty(payload)) _write(payload); }, 30 * 1000); } function _stopPusher() { if (_pushTimer) { clearInterval(_pushTimer); _pushTimer = null; } } its.spreader.enable = function (opts) { opts = opts || {}; its.spreader.debug = !!opts.debug; its.spreader.autoMerge = opts.autoMerge !== false; its.spreader.cleanUrl = opts.cleanUrl !== false; its.spreader.hijackLinks = opts.hijackLinks !== false; _receiveFromUrl(); _receiveFromCookie(); _hijackLinks(); _startPusher(); _log('enabled with options', opts); }; its.spreader.disable = function () { _stopPusher(); its.spreader.debug = false; _log('disabled'); }; its.spreader.push = function () { const payload = _harvest(); if (!its.isEmpty(payload)) _write(payload); }; its.spreader.pull = function () { const payload = _read(); if (payload) _inject(payload); }; if (its.spreader.autoStart) its.spreader.enable(); })(); Save → deploy → call `its.spreader.enable()` (or set `its.spreader.autoStart = true` before loading the file) and the state will automatically follow users across any site that includes the same bundle.
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
API-Flaw Profit Guide
CSS | 18 min ago | 0.99 KB
This month smells like profit
CSS | 25 min ago | 0.99 KB
Schrödinger's Crit
1 day ago | 15.37 KB
PRCE internal cursor
2 days ago | 0.73 KB
AI Interaction Method
2 days ago | 1.60 KB
awkwrapper.c
C | 2 days ago | 2.35 KB
z66is_archive.zip.txt
2 days ago | 39.19 KB
Clients: Setting up 2FA
3 days ago | 1.44 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!