Last active
August 29, 2015 14:11
-
-
Save jhorsman/f19159df4ff054c58bcb to your computer and use it in GitHub Desktop.
LiveContent login bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){if(window.location.href.indexOf("docs.sdl.com") != -1 && document.getElementById("username")) {if($("#loginForm").length == 0) {$(".fields").css("position", "relative");$("<p style='color: orange; position: absolute; right: 40px; top: -8px;'>Enhanced by LiveContent bookmarklet</p>").prependTo(".fields");$(".splash .fields").wrap("<form id='loginForm' onsubmit='javascript: $(\"div.login_button.xref\").children(\"img\").click(); return false;'/>");$("<input id='formSubmitButton' type='submit' value='Submit' style='display: none;'/>").appendTo(".login_button");imageButton = $("div.login_button.xref").children("img");imageButton.hide();$("<img onClick='$(\"#formSubmitButton\").click()'/>").attr("src", imageButton.attr("src")).insertAfter(imageButton);}} else {window.location.href="http://docs.sdl.com/LiveContent/"}}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(window.location.href.indexOf("docs.sdl.com") != -1 && document.getElementById("username")) { | |
if($("#loginForm").length == 0) { | |
$(".fields").css("position", "relative"); | |
$("<p style='color: orange; position: absolute; right: 40px; top: -8px;'>Enhanced by LiveContent bookmarklet</p>").prependTo(".fields"); | |
$(".splash .fields").wrap("<form id='loginForm' onsubmit='javascript: $(\"div.login_button.xref\").children(\"img\").click(); return false;'/>"); | |
$("<input id='formSubmitButton' type='submit' value='Submit' style='display: none;'/>").appendTo(".login_button"); | |
imageButton = $("div.login_button.xref").children("img"); | |
imageButton.hide(); | |
$("<img onClick='$(\"#formSubmitButton\").click()'/>").attr("src", imageButton.attr("src")).insertAfter(imageButton); | |
} | |
} else { | |
window.location.href="http://docs.sdl.com/LiveContent/" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment