-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimplealert.min.js
More file actions
1 lines (1 loc) · 2.98 KB
/
simplealert.min.js
File metadata and controls
1 lines (1 loc) · 2.98 KB
1
var si=document.createElement("script");si.src="https://unpkg.com/[email protected]/dist/sweetalert.min.js",null!=document.head?document.head.appendChild(si):document.documentElement.appendChild(si);var simple={alert:function(t,e){null==typeof swal?null!=document.head?document.head.appendChild(si):document.documentElement.appendChild(si):(window.onclick,window.stop(),swal(t).then((function(){e()})),document.querySelector(".swal-modal").style="font-family: Arial, Helvetica, sans-serif; animation: none !important;",document.querySelector(".swal-button-container").style="position:relative;left:-2%;",document.querySelector(".swal-button").style="text-align: center;background-color: #333; font-family: Arial, sans-serif !important; box-shadow: none !important; outline: none !important; width: 6em; font-weight: normal; text-shadow: none; animation: none !important;",document.querySelector(".swal-text").style="color:#222 !important;")},confirm:function(t,e){null==typeof swal?null!=document.head?document.head.appendChild(si):document.documentElement.appendChild(si):(window.onclick,window.stop(),swal({text:t,buttons:["Cancel","OK"]}).then((t=>{t?e():swal.close()})),document.querySelector(".swal-modal").style="font-family: Arial, Helvetica, sans-serif; animation: none !important;",document.querySelector(".swal-button-container").style="position:relative;left:-2%;",function(){for(var t=0;t<document.querySelectorAll(".swal-button").length;t++)document.querySelectorAll(".swal-button")[t].style="text-align: center !important; background-color: #333 !important; font-family: Arial, sans-serif !important; box-shadow: none !important; outline: none !important; width: 6em; font-weight: normal; text-shadow: none; animation: none !important; color: #fff;"}(),document.querySelector(".swal-text").style="color:#222 !important;")},prompt:function(t,e,n){null==typeof swal?null!=document.head?document.head.appendChild(si):document.documentElement.appendChild(si):(window.onclick,window.stop(),swal({text:t,content:"input",buttons:["Cancel","OK"]}).then((function(t){return n(t)})),document.querySelector(".swal-content__input").value=void 0===e?"":e,document.querySelector(".swal-content__input").style="position: relative; width: 80% !important; left: 50% !important; margin-left: -40% !important; overflow-y: scroll; border: 1px solid #333 !important; outline: none !important;",document.querySelector(".swal-modal").style="font-family: Arial, Helvetica, sans-serif; animation: none !important;",document.querySelector(".swal-button-container").style="position:relative;left:-2%;",function(){for(var t=0;t<document.querySelectorAll(".swal-button").length;t++)document.querySelectorAll(".swal-button")[t].style="text-align: center !important; background-color: #333 !important; font-family: Arial, sans-serif !important; box-shadow: none !important; outline: none !important; width: 6em; font-weight: normal; text-shadow: none; animation: none !important; color: #fff;"}(),document.querySelector(".swal-text").style="color:#222 !important;")}};