Advertisement
Guest User

Untitled

a guest
Sep 1st, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.99 KB | None | 0 0
  1. <input type="text" name="j_username" id="j_username" autocorrect="off" autocapitalize="off" style="background-image: linear-gradient(rgba(255, 255, 255, 0) 96%, rgb(41, 140, 196) 4%); background-position: 0px 0px; background-repeat: no-repeat;">
  2.  
  3. <input type="password" name="j_password">
  4.  
  5. <input type="text" name="j_username" id="j_username" value="" autofocus required style="background-image: linear-gradient(rgba(255, 255, 255, 0) 96%, rgb(41, 140, 196) 4%); background-position: -298px 0px; background-repeat: no-repeat;" placeholder="LDAP Username">
  6.  
  7. <input type="password" name="j_password" autofocus required style="background-image: linear-gradient(rgba(255, 255, 255, 0) 96%, rgb(41, 140, 196) 4%); background-position: -298px 0px; background-repeat: no-repeat;" placeholder="LDAP Password">
  8.  
  9. function checkToggle(e) {
  10. e.prop("checked",!0)
  11. }
  12.  
  13. function writeCookie(e,t,n) {
  14. var o,r;n?(o=new Date,o.setTime(o.getTime()+1e3*60*60*24*n),r="; expires="+o.toGMTString()):r="",
  15. document.cookie=e+"="+t+r+"; path=/"
  16. }
  17.  
  18. function readCookie(e) {
  19. var t,n,o,r=e+"=";
  20. for(o=document.cookie.split(";"),t=0; o.length>t; t++) {
  21. for(n=o[t]; " "==n.charAt(0);)
  22. n=n.substring(1,n.length);
  23. if(0==n.indexOf(r))
  24. return n.substring(r.length,n.length)
  25. }
  26. return""
  27. }
  28. jQuery (
  29. function(e) {
  30. function t(t) {
  31. return e("<div />",{"class":t})
  32. }
  33. if ("/login"==window.location.pathname) {
  34. var n="Welcome to Jenkins";
  35. var user='autofocus required="" style="background-image: linear-gradient(rgba(255, 255, 255, 0) 96%, rgb(41, 140, 196) 4%); background-position: -298px 0px; background-repeat: no-repeat;" placeholder="Covisint LDAP Username"';
  36. var pass='autofocus required="" style="background-image: linear-gradient(rgba(255, 255, 255, 0) 96%, rgb(41, 140, 196) 4%); background-position: -298px 0px; background-repeat: no-repeat;" placeholder="Password"';
  37. e("#main-panel"),e("#side-panel");
  38. var o=e('input[name="j_username"]').closest("td").prev("td").addClass("input-label"),r=e('input[name="j_password"]').closest("td").prev("td").addClass("input-label");
  39. // e('input').replaceTag($('<input autofocus="" required="" style="background-image: linear-gradient(rgba(255, 255, 255, 0) 96%, rgb(41, 140, 196) 4%); background-position: -298px 0px; background-repeat: no-repeat;">').addClass('wasDiv'), true);
  40. e("a[href=signup]").closest("div").addClass("signup-container"),e("#yui-gen1-button").addClass("login-button");
  41. var i=e(".submit-button"),a=e("#main-panel div:first").addClass("login-container"),c=e('form[name="login"]').length;
  42. c&&(o.text(""),r.text(""),a.removeAttr("style"),a.wrap(t("login-outer")),a.wrap(t("login-wrapper").prepend(" <h2> "+n+" </h2> ")),i.wrap(t("button-wrapper")),e(".login-container div:last").removeAttr("style"))
  43. }
  44. }
  45. ),
  46.  
  47. jQuery (
  48. function(e) {
  49. var t='<div class="toggle"></div><input id="cmn-toggle-7" class="cmn-toggle cmn-toggle-yes-no" type="checkbox"><label for="cmn-toggle-7" data-on="Hide" data-off="Show"></label>';
  50. e("#description-link").text("edit description"),e("#description").before(t),"checked"!=readCookie("toggle")?e("#description").hide():(checkToggle(e(".cmn-toggle")),e("#description").show()),e(".cmn-toggle").change(function() {
  51. e("#description").slideToggle("fast"),e(".cmn-toggle").is(":checked")?writeCookie("toggle","checked",30):writeCookie("toggle","unchecked",30)
  52. })
  53. }
  54. ),
  55.  
  56. jQuery (
  57. function() {
  58. function e(e) {
  59. var t=jQuery(e.target),n=t.attr("name"),r=t.attr("value"),i=t.is(":checked");
  60. "on"===r&&(i=!1),document.cookie=n+"="+o(r+i)
  61. }
  62.  
  63. function t(e) {
  64. var t=jQuery(e.target),r=t.attr("name"),i=t.attr("value"),a=t.is(":checked");
  65. return n(r)===o(i+a)?!0:!1
  66. }
  67.  
  68. function n(e) {
  69. var t,n,o,r=e+"=";
  70. for (o=document.cookie.split(";"),t=0; o.length>t; t++) {
  71. for (n=o[t]; " "==n.charAt(0);)
  72. n=n.substring(1,n.length);
  73. if(0==n.indexOf(r))
  74. return n.substring(r.length,n.length)
  75. }
  76. return""
  77. }
  78.  
  79. function o(e) {
  80. for(var t=e.length,n=[],o=0; t>o; o++) {
  81. var r=e[o].charCodeAt().toString(2);
  82. n.push(Array(8-r.length+1).join("0")+r)
  83. }
  84. return n.join(" ")
  85. }
  86.  
  87. var r="#dfd",i="#fff";
  88. jQuery ('.setting-input, input[type="checkbox"]').one("click",function(t) {
  89. e(t)
  90. }),
  91. jQuery(".setting-input").on("input propertychange paste",function(e) {
  92. t(e)?jQuery(e.target).css("background-color",i):jQuery(e.target).css("background-color",r)
  93. }),
  94. jQuery('input[type="checkbox"]').change(function(e) {
  95. t(e)?jQuery(e.target.parentNode).css("background-color",i):jQuery(e.target.parentNode).css("background-color",r)
  96. })
  97. }
  98. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement