Skip to content

Instantly share code, notes, and snippets.

@nehemiahj
Created February 9, 2022 19:20
Show Gist options
  • Save nehemiahj/5530fec1c0af2e50d6c462f2be9e297a to your computer and use it in GitHub Desktop.
Save nehemiahj/5530fec1c0af2e50d6c462f2be9e297a to your computer and use it in GitHub Desktop.
UserScript to load the latest Sitecore Document Version
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.tampermonkey.net/index.php?version=4.14&ext=dhdg&updated=true
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// @include https://doc.sitecore.com/*
// ==/UserScript==
(function() {
'use strict';
setTimeout(function() {
if (document.getElementById("select-version").selectedIndex != 0){
document.getElementById("select-version").selectedIndex = 0
var evt = document.createEvent("HTMLEvents");
evt.initEvent("change", false, true);
document.getElementById("select-version").dispatchEvent(evt);
}
}, 500);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment