Quellcode durchsuchen

Copy the permalink to the clipboard and put it in the url bar, rather than reloading the page

master
Fen Dweller vor 5 Jahren
Ursprung
Commit
127229d9cb
1 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen
  1. +5
    -3
      macrovision.js

+ 5
- 3
macrovision.js Datei anzeigen

@@ -3646,10 +3646,12 @@ function b64DecodeUnicode(str) {

function linkScene() {
loc = new URL(window.location);


window.location = loc.protocol + "//" + loc.host + loc.pathname + "?scene=" + b64EncodeUnicode(JSON.stringify(exportScene()));
const link = loc.protocol + "//" + loc.host + loc.pathname + "?scene=" + b64EncodeUnicode(JSON.stringify(exportScene()));
window.history.replaceState(null, "Macrovision", link);
navigator.clipboard.writeText(link);
toast("Copied permalink to clipboard");
}

function copyScene() {
const results = exportScene();



Laden…
Abbrechen
Speichern