mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Fix new copy driver on pages without a copy button
This commit is contained in:
parent
0d6e9d4c57
commit
582eda24d7
3 changed files with 3 additions and 2 deletions
|
@ -5375,8 +5375,8 @@ register_module([
|
|||
|
||||
// Add the snippet that copies the embed markdown code to the clipboard
|
||||
page_renderer::AddJSSnippet('window.addEventListener("load", function(event) {
|
||||
console.log("initialising copy driver");
|
||||
let button = document.querySelector(".short-embed-markdown-button");
|
||||
if(button == null) return;
|
||||
button.addEventListener("click", function(inner_event) {
|
||||
let input = document.querySelector(".short-embed-markdown-code");
|
||||
input.select();
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
|
||||
"id": "feature-upload",
|
||||
"lastupdate": 1513119449,
|
||||
"lastupdate": 1513158485,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -532,6 +532,7 @@ register_module([
|
|||
// Add the snippet that copies the embed markdown code to the clipboard
|
||||
page_renderer::AddJSSnippet('window.addEventListener("load", function(event) {
|
||||
let button = document.querySelector(".short-embed-markdown-button");
|
||||
if(button == null) return;
|
||||
button.addEventListener("click", function(inner_event) {
|
||||
let input = document.querySelector(".short-embed-markdown-code");
|
||||
input.select();
|
||||
|
|
Loading…
Reference in a new issue