Skip to content

Instantly share code, notes, and snippets.

@pyhedgehog
Last active July 5, 2023 11:21
Show Gist options
  • 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 [email protected]
// @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 [email protected]
// @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