Skip to content

Commit 2722974

Browse files
authored
Merge pull request #82 from achilleas-k/plugins-version-fix
Syntax highlight plugin fix
2 parents 6958842 + 45600ee commit 2722974

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

public/img/gogs-hero.png

34.2 KB
Loading

public/js/gogs.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,21 +1281,7 @@ $(document).ready(function () {
12811281

12821282
// Highlight JS
12831283
if (typeof hljs != 'undefined') {
1284-
if (typeof(Worker) !== "undefined") {
1285-
addEventListener('load', function () {
1286-
var code = document.querySelector('code');
1287-
var worker = new Worker('/plugins/highlighter.js');
1288-
worker.onmessage = function (event) {
1289-
code.innerHTML = event.data;
1290-
}
1291-
if (code !== null) {
1292-
worker.postMessage(code.textContent);
1293-
}
1294-
})
1295-
} else {
1296-
hljs.initHighlightingOnLoad()
1297-
}
1298-
1284+
hljs.initHighlightingOnLoad();
12991285
}
13001286

13011287
// Dropzone

public/plugins/highlighter.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)