Skip to content

Instantly share code, notes, and snippets.

@pyhedgehog
Last active July 5, 2023 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyhedgehog/82f3431d3288abbd467204f5d9340c02 to your computer and use it in GitHub Desktop.
Save pyhedgehog/82f3431d3288abbd467204f5d9340c02 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Show edit button on Saltcorn wiki page
// @id editWikiSaltcornCom@pyhedgehog.github.com
// @namespace https://gist.github.com/pyhedgehog/
// @description Show edit button on Saltcorn wiki page
// @homepage https://gist.github.com/pyhedgehog/82f3431d3288abbd467204f5d9340c02/
// @downloadURL https://gist.github.com/pyhedgehog/82f3431d3288abbd467204f5d9340c02/raw/editWikiSaltcornCom.user.js
// @updateURL https://gist.github.com/pyhedgehog/82f3431d3288abbd467204f5d9340c02/raw/editWikiSaltcornCom.meta.js
// @match https://wiki.saltcorn.com/view/ShowPage/*
// @match https://wiki.saltcorn.com/view/ShowPage?*
// @version 3
// ==/UserScript==
// ==UserScript==
// @name Show edit button on Saltcorn wiki page
// @id editWikiSaltcornCom@pyhedgehog.github.com
// @namespace https://gist.github.com/pyhedgehog/
// @description Show edit button on Saltcorn wiki page
// @homepage https://gist.github.com/pyhedgehog/82f3431d3288abbd467204f5d9340c02/
// @downloadURL https://gist.github.com/pyhedgehog/82f3431d3288abbd467204f5d9340c02/raw/editWikiSaltcornCom.user.js
// @updateURL https://gist.github.com/pyhedgehog/82f3431d3288abbd467204f5d9340c02/raw/editWikiSaltcornCom.meta.js
// @match https://wiki.saltcorn.com/view/ShowPage/*
// @match https://wiki.saltcorn.com/view/ShowPage?*
// @version 3
// ==/UserScript==
document.getElementById('content').appendChild((new DOMParser()).parseFromString(`<div class="position-absolute top-0 end-0"><a href="/view/EditPage?title=${document.title}" class="btn btn-outline-secondary mt-2 me-3">Edit</a></div>`, 'text/html').body.firstChild);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment