pure-systems.com syntax highlighting

For documentation pages. Example page: https://www.pure-systems.com/pv-update/additions/doc/latest/com.ps.consul.eclipse.ui.doc/ch06s14.html

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @license MIT
// @name        pure-systems.com syntax highlighting
// @namespace   Violentmonkey Scripts
// @match       https://www.pure-systems.com/*
// @grant       none
// @version     1.0
// @author      -
// @description For documentation pages. Example page: https://www.pure-systems.com/pv-update/additions/doc/latest/com.ps.consul.eclipse.ui.doc/ch06s14.html
// @require https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js
// ==/UserScript==

$("head").append('<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css">')
$(".programlisting").each(function () {
  if ($(this).children().length == 0) {
    $(this).wrapInner(document.createElement("code")) //wrap the content in a <code> tag
  }
  else {
    $(this).children().wrapInner(document.createElement("code")) //wrap each child's content in its own <code> tag
  }
});

hljs.highlightAll();