newLISP-Documentation-Highlight

Provide syntax hightlighting in newLISP documentation

Verze ze dne 28. 04. 2015. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name      newLISP-Documentation-Highlight
// @namespace http://lambda.que.jp/
// @version   20141120
// @description  Provide syntax hightlighting in newLISP documentation
// @grant   GM_addStyle
// @grant   GM_getResourceText
// @match   http://www.newlisp.org/*/newlisp_manual.html
// @match   http://www.newlisp.org/*/CodePatterns.html
// @match   http://newlisp.nfshost.com/*/newlisp_manual.html
// @match   http://newlisp.nfshost.com/*/CodePatterns.html
// @require http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js
// @require http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/highlight.min.js
// @require http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/languages/lisp.min.js
// @resource default.css http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/styles/default.min.css
// @resource github.css  http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/styles/github.min.css
// @resource zenburn.css http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/styles/zenburn.min.css
// @author KOBAYASHI Shigeru (kosh)
// @license Public domain
// ==/UserScript==

GM_addStyle([
    GM_getResourceText("zenburn.css"),
    "pre code { font-size: 110%; font-family: Consolas, 'Courier New', Courier, Monaco, monospace; }",
    "span.arw { color: inherit; }"
].join("\n"));

var code = $("<code/>").addClass("lisp");
$("pre").wrapInner(code);

hljs.configure({languages:["lisp", "c", "bash"]});
hljs.initHighlighting();