mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
reserve names to avoid ie11 pollution
This commit is contained in:
parent
d0bb1ad141
commit
9fcb4d222b
|
@ -1052,7 +1052,7 @@ function goto(dest) {
|
||||||
|
|
||||||
clmod(document.documentElement, 'op_open', dest);
|
clmod(document.documentElement, 'op_open', dest);
|
||||||
|
|
||||||
if (window['treectl'])
|
if (treectl)
|
||||||
treectl.onscroll();
|
treectl.onscroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1508,7 +1508,7 @@ var widget = (function () {
|
||||||
clmod(document.documentElement, 'np_open', is_open);
|
clmod(document.documentElement, 'np_open', is_open);
|
||||||
clmod(widget, 'open', is_open);
|
clmod(widget, 'open', is_open);
|
||||||
bcfg_set('au_open', r.is_open = is_open);
|
bcfg_set('au_open', r.is_open = is_open);
|
||||||
if (window.vbar) {
|
if (vbar) {
|
||||||
pbar.onresize();
|
pbar.onresize();
|
||||||
vbar.onresize();
|
vbar.onresize();
|
||||||
}
|
}
|
||||||
|
@ -2421,7 +2421,7 @@ function play(tid, is_ev, seek) {
|
||||||
clmod(ebi(oid), 'act', 1);
|
clmod(ebi(oid), 'act', 1);
|
||||||
clmod(ebi(oid).closest('tr'), 'play', 1);
|
clmod(ebi(oid).closest('tr'), 'play', 1);
|
||||||
clmod(ebi('wtoggle'), 'np', mpl.clip);
|
clmod(ebi('wtoggle'), 'np', mpl.clip);
|
||||||
if (window.thegrid)
|
if (thegrid)
|
||||||
thegrid.loadsel();
|
thegrid.loadsel();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -3392,7 +3392,7 @@ var showfile = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
r.setstyle = function () {
|
r.setstyle = function () {
|
||||||
if (window['no_prism'])
|
if (window.no_prism)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
qsr('#prism_css');
|
qsr('#prism_css');
|
||||||
|
@ -3521,7 +3521,7 @@ var showfile = (function () {
|
||||||
else {
|
else {
|
||||||
el.textContent = txt;
|
el.textContent = txt;
|
||||||
el.innerHTML = '<code>' + el.innerHTML + '</code>';
|
el.innerHTML = '<code>' + el.innerHTML + '</code>';
|
||||||
if (!window['no_prism']) {
|
if (!window.no_prism) {
|
||||||
el.className = 'prism linkable-line-numbers line-numbers language-' + lang;
|
el.className = 'prism linkable-line-numbers line-numbers language-' + lang;
|
||||||
if (!defer)
|
if (!defer)
|
||||||
fun(el.firstChild);
|
fun(el.firstChild);
|
||||||
|
@ -3747,7 +3747,7 @@ var thegrid = (function () {
|
||||||
ebi('bdoc').style.display = 'none';
|
ebi('bdoc').style.display = 'none';
|
||||||
clmod(ebi('wrap'), 'doc');
|
clmod(ebi('wrap'), 'doc');
|
||||||
qsr('#docname');
|
qsr('#docname');
|
||||||
if (window['treectl'])
|
if (treectl)
|
||||||
treectl.textmode(false);
|
treectl.textmode(false);
|
||||||
|
|
||||||
aligngriditems();
|
aligngriditems();
|
||||||
|
@ -4610,7 +4610,7 @@ document.onkeydown = function (e) {
|
||||||
})();
|
})();
|
||||||
|
|
||||||
function aligngriditems() {
|
function aligngriditems() {
|
||||||
if (!window.treectl)
|
if (!treectl)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var em2px = parseFloat(getComputedStyle(ebi('ggrid')).fontSize);
|
var em2px = parseFloat(getComputedStyle(ebi('ggrid')).fontSize);
|
||||||
|
@ -5496,7 +5496,7 @@ function apply_perms(newperms) {
|
||||||
'table-cell' : 'none';
|
'table-cell' : 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window['up2k'])
|
if (up2k)
|
||||||
up2k.set_fsearch();
|
up2k.set_fsearch();
|
||||||
|
|
||||||
ebi('widget').style.display = have_read ? '' : 'none';
|
ebi('widget').style.display = have_read ? '' : 'none';
|
||||||
|
@ -5629,7 +5629,7 @@ var filecols = (function () {
|
||||||
for (var b = 0, bb = tds.length; b < bb; b++)
|
for (var b = 0, bb = tds.length; b < bb; b++)
|
||||||
tds[b].className = cls;
|
tds[b].className = cls;
|
||||||
}
|
}
|
||||||
if (window['tt']) {
|
if (tt) {
|
||||||
tt.att(ebi('hcols'));
|
tt.att(ebi('hcols'));
|
||||||
tt.att(QS('#files>thead'));
|
tt.att(QS('#files>thead'));
|
||||||
}
|
}
|
||||||
|
@ -6215,7 +6215,7 @@ function show_md(md, name, div, url, depth) {
|
||||||
if (url != now)
|
if (url != now)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!window['marked']) {
|
if (!marked) {
|
||||||
if (depth)
|
if (depth)
|
||||||
return toast.warn(10, errmsg + 'failed to load marked.js')
|
return toast.warn(10, errmsg + 'failed to load marked.js')
|
||||||
|
|
||||||
|
@ -6579,7 +6579,7 @@ function reload_browser() {
|
||||||
for (var a = 0; a < ns.length; a++)
|
for (var a = 0; a < ns.length; a++)
|
||||||
clmod(ebi(ns[a]), 'hidden', ebi('unsearch'));
|
clmod(ebi(ns[a]), 'hidden', ebi('unsearch'));
|
||||||
|
|
||||||
if (window['up2k'])
|
if (up2k)
|
||||||
up2k.set_fsearch();
|
up2k.set_fsearch();
|
||||||
|
|
||||||
thegrid.setdirty();
|
thegrid.setdirty();
|
||||||
|
|
|
@ -498,5 +498,5 @@ dom_navtgl.onclick = function () {
|
||||||
if (sread('hidenav') == 1)
|
if (sread('hidenav') == 1)
|
||||||
dom_navtgl.onclick();
|
dom_navtgl.onclick();
|
||||||
|
|
||||||
if (window['tt'])
|
if (window.tt && tt.init)
|
||||||
tt.init();
|
tt.init();
|
||||||
|
|
|
@ -928,7 +928,7 @@ function up2k_init(subtle) {
|
||||||
r.st = st;
|
r.st = st;
|
||||||
r.uc = uc;
|
r.uc = uc;
|
||||||
|
|
||||||
if (!window.File || !File.prototype.slice || !window.FileReader || !window.FileList)
|
if (!window.File || !window.FileReader || !window.FileList || !File.prototype || !File.prototype.slice)
|
||||||
return un2k(L.u_ever);
|
return un2k(L.u_ever);
|
||||||
|
|
||||||
var flag = false;
|
var flag = false;
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
if (!window['console'])
|
if (!window.console || !console.log)
|
||||||
window['console'] = {
|
window.console = {
|
||||||
"log": function (msg) { }
|
"log": function (msg) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var wah = '',
|
var wah = '',
|
||||||
|
L, tt, treectl, thegrid, up2k, asmCrypto, hashwasm, vbar, marked,
|
||||||
CB = '?_=' + Date.now(),
|
CB = '?_=' + Date.now(),
|
||||||
HALFMAX = 8192 * 8192 * 8192 * 8192,
|
HALFMAX = 8192 * 8192 * 8192 * 8192,
|
||||||
HTTPS = (window.location + '').indexOf('https:') === 0,
|
HTTPS = (window.location + '').indexOf('https:') === 0,
|
||||||
|
@ -17,6 +18,15 @@ var wah = '',
|
||||||
IPHONE = TOUCH && /iPhone|iPad|iPod/i.test(navigator.userAgent),
|
IPHONE = TOUCH && /iPhone|iPad|iPod/i.test(navigator.userAgent),
|
||||||
WINDOWS = navigator.platform ? navigator.platform == 'Win32' : /Windows/.test(navigator.userAgent);
|
WINDOWS = navigator.platform ? navigator.platform == 'Win32' : /Windows/.test(navigator.userAgent);
|
||||||
|
|
||||||
|
if (!window.WebAssembly || !WebAssembly.Memory)
|
||||||
|
window.WebAssembly = false;
|
||||||
|
|
||||||
|
if (!window.Notification || !Notification.permission)
|
||||||
|
window.Notification = false;
|
||||||
|
|
||||||
|
if (!window.FormData)
|
||||||
|
window.FormData = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CB = '?' + document.currentScript.src.split('?').pop();
|
CB = '?' + document.currentScript.src.split('?').pop();
|
||||||
|
|
||||||
|
@ -381,13 +391,14 @@ function clgot(el, cls) {
|
||||||
|
|
||||||
|
|
||||||
var ANIM = true;
|
var ANIM = true;
|
||||||
if (window.matchMedia) {
|
try {
|
||||||
var mq = window.matchMedia('(prefers-reduced-motion: reduce)');
|
var mq = window.matchMedia('(prefers-reduced-motion: reduce)');
|
||||||
mq.onchange = function () {
|
mq.onchange = function () {
|
||||||
ANIM = !mq.matches;
|
ANIM = !mq.matches;
|
||||||
};
|
};
|
||||||
ANIM = !mq.matches;
|
ANIM = !mq.matches;
|
||||||
}
|
}
|
||||||
|
catch (ex) { }
|
||||||
|
|
||||||
|
|
||||||
function yscroll() {
|
function yscroll() {
|
||||||
|
@ -747,7 +758,7 @@ function lhumantime(v) {
|
||||||
var t = shumantime(v, 1),
|
var t = shumantime(v, 1),
|
||||||
tp = t.replace(/([a-z])/g, " $1 ").split(/ /g).slice(0, -1);
|
tp = t.replace(/([a-z])/g, " $1 ").split(/ /g).slice(0, -1);
|
||||||
|
|
||||||
if (!window.L || tp.length < 2 || tp[1].indexOf('$') + 1)
|
if (!L || tp.length < 2 || tp[1].indexOf('$') + 1)
|
||||||
return t;
|
return t;
|
||||||
|
|
||||||
var ret = '';
|
var ret = '';
|
||||||
|
@ -1251,8 +1262,8 @@ var modal = (function () {
|
||||||
tok, tng, prim, sec, ok_cancel;
|
tok, tng, prim, sec, ok_cancel;
|
||||||
|
|
||||||
r.load = function () {
|
r.load = function () {
|
||||||
tok = (window.L && L.m_ok) || 'OK';
|
tok = (L && L.m_ok) || 'OK';
|
||||||
tng = (window.L && L.m_ng) || 'Cancel';
|
tng = (L && L.m_ng) || 'Cancel';
|
||||||
prim = '<a href="#" id="modal-ok">' + tok + '</a>';
|
prim = '<a href="#" id="modal-ok">' + tok + '</a>';
|
||||||
sec = '<a href="#" id="modal-ng">' + tng + '</a>';
|
sec = '<a href="#" id="modal-ng">' + tng + '</a>';
|
||||||
ok_cancel = WINDOWS ? prim + sec : sec + prim;
|
ok_cancel = WINDOWS ? prim + sec : sec + prim;
|
||||||
|
@ -1612,7 +1623,7 @@ function xhrchk(xhr, prefix, e404, lvl, tag) {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (xhr.status == 403)
|
if (xhr.status == 403)
|
||||||
return toast.err(0, prefix + (window.L && L.xhr403 || "403: access denied\n\ntry pressing F5, maybe you got logged out"), tag);
|
return toast.err(0, prefix + (L && L.xhr403 || "403: access denied\n\ntry pressing F5, maybe you got logged out"), tag);
|
||||||
|
|
||||||
if (xhr.status == 404)
|
if (xhr.status == 404)
|
||||||
return toast.err(0, prefix + e404, tag);
|
return toast.err(0, prefix + e404, tag);
|
||||||
|
|
Loading…
Reference in a new issue