diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css
index 8953d35e..3a3a8aa5 100644
--- a/copyparty/web/browser.css
+++ b/copyparty/web/browser.css
@@ -55,11 +55,10 @@ body {
display: block;
padding: .3em 0;
}
-#files[ts] tbody div a {
+#files tbody div a {
color: #f5a;
}
-a,
-#files[ts] tbody div a:last-child {
+a, #files tbody div a:last-child {
color: #fc5;
padding: .2em;
text-decoration: none;
@@ -592,3 +591,25 @@ input[type="checkbox"]:checked+label {
padding: 0;
border-bottom: 1px solid #555;
}
+#opdesc {
+ display: none;
+}
+#ops:hover #opdesc {
+ display: block;
+ background: linear-gradient(0deg,#555, #4c4c4c 80%, #444);
+ box-shadow: 0 .3em 1em #222;
+ padding: 1em;
+ border-radius: .3em;
+ position: absolute;
+ z-index: 3;
+ top: 6em;
+ right: 1.5em;
+}
+#opdesc code {
+ background: #3c3c3c;
+ padding: .2em .3em;
+ border-top: 1px solid #777;
+ border-radius: .3em;
+ font-family: monospace, monospace;
+ line-height: 2em;
+}
\ No newline at end of file
diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html
index eb58810d..904e08ac 100644
--- a/copyparty/web/browser.html
+++ b/copyparty/web/browser.html
@@ -12,18 +12,19 @@
diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js
index 8625b548..67e92969 100644
--- a/copyparty/web/browser.js
+++ b/copyparty/web/browser.js
@@ -510,7 +510,7 @@ function evau_error(e) {
if (eplaya.error.message)
err += '\n\n' + eplaya.error.message;
- err += '\n\nFile: ยซ' + uricom_dec(eplaya.src.split('/').slice(-1)[0]) + 'ยป';
+ err += '\n\nFile: ยซ' + uricom_dec(eplaya.src.split('/').slice(-1)[0])[0] + 'ยป';
alert(err);
}
@@ -545,7 +545,7 @@ function autoplay_blocked() {
var na = ebi('blk_na');
var fn = mp.tracks[mp.au.tid].split(/\//).pop();
- fn = uricom_dec(fn.replace(/\+/g, ' '));
+ fn = uricom_dec(fn.replace(/\+/g, ' '))[0];
go.textContent = 'Play "' + fn + '"';
go.onclick = function (e) {
@@ -776,7 +776,7 @@ function autoplay_blocked() {
ebi('treeul').setAttribute('ts', this.ts);
var top = this.top == '.' ? this.dst : this.top,
- name = uricom_dec(top.split('/').slice(-2)[0]),
+ name = uricom_dec(top.split('/').slice(-2)[0])[0],
rtop = top.replace(/^\/+/, "");
try {
@@ -912,7 +912,7 @@ function autoplay_blocked() {
for (var a = 0; a < nodes.length; a++) {
var r = nodes[a],
ln = ['
' + r.lead + ' | ' + esc(uricom_dec(r.href)) + '', r.sz];
+ top + r.href + '">' + esc(uricom_dec(r.href)[0]) + '', r.sz];
for (var b = 0; b < res.taglist.length; b++) {
var k = res.taglist[b],
@@ -963,8 +963,8 @@ function autoplay_blocked() {
var kk = keys[a],
ks = kk.slice(1),
k = uricom_dec(ks),
- hek = esc(k),
- uek = ks == k ? k : uricom_enc(k, true),
+ hek = esc(k[0]),
+ uek = k[1] ? uricom_enc(k[0], true) : k[0],
url = '/' + (top ? top + uek : uek) + '/',
sym = res[kk] ? '-' : '+',
link = '' + sym + '' + dec + '');
}
diff --git a/copyparty/web/mde.js b/copyparty/web/mde.js
index 13edf73f..1e7e2bfa 100644
--- a/copyparty/web/mde.js
+++ b/copyparty/web/mde.js
@@ -15,7 +15,7 @@ var dom_md = ebi('mt');
if (a > 0)
loc.push(n[a]);
- var dec = uricom_dec(n[a]).replace(/&/g, "&").replace(//g, ">");
+ var dec = uricom_dec(n[a])[0].replace(/&/g, "&").replace(//g, ">");
nav.push('' + dec + '');
}
diff --git a/copyparty/web/util.js b/copyparty/web/util.js
index fc08bde6..9e49f527 100644
--- a/copyparty/web/util.js
+++ b/copyparty/web/util.js
@@ -237,11 +237,11 @@ function uricom_enc(txt, do_fb_enc) {
function uricom_dec(txt) {
try {
- return decodeURIComponent(txt);
+ return [decodeURIComponent(txt), true];
}
catch (ex) {
console.log("ucd-err [" + txt + "]");
- return txt;
+ return [txt, false];
}
}
@@ -260,7 +260,7 @@ function get_evpath() {
function get_vpath() {
- return uricom_dec(get_evpath());
+ return uricom_dec(get_evpath())[0];
}
|