Skip to content

page for manage all the pages

Lasse Støjier Pedersen edited this page Jun 13, 2022 · 1 revision

To generate wiki menu links

use tampermonkey. and then enter one of the wiki pages, and it will add the MD into the console.

Into the first, need to have the first "*" removed, to be a main node in the menu

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://github.com/quer/the-steam-awards/wiki/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.com
// @require http://code.jquery.com/jquery-1.12.4.min.js
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var endText = "";
for (let i = 0; i < $("#wiki-body .anchor").length; i++) {
    var ss = $($("#wiki-body .anchor")[i]);
    var text = ss.parent().text().trim();
    var link = window.location.href + ss.attr("href");
    endText += `* **[${text}](${link})**
`;
}
console.log(endText);
})();