aboutsummaryrefslogtreecommitdiff
path: root/html/display_panel
diff options
context:
space:
mode:
Diffstat (limited to 'html/display_panel')
-rw-r--r--html/display_panel/content/main_panel.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index 022be8c..83c3a6b 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -132,9 +132,9 @@ function createList(data, group){
a.href = scriptId.split("(")[0];
if (scriptId.startsWith("view-source:")) {
a.target ="LibreJS-ViewSource";
- let source = scriptId.split("\n")[1];
+ let source = scriptId.match(/\n([^]*)/);
if (source) {
- li.querySelector(".source").textContent = decodeURIComponent(source);
+ li.querySelector(".source").textContent = source[1];
li.querySelector(".toggle-source").style.display = "inline";
}
scriptId = scriptId.replace(viewSourceToHuman, "$3 at line $2 of $1");