standard jquery

This commit is contained in:
Shish 2020-03-02 17:12:43 +00:00
parent ca462d86f1
commit 5058e1f3fd
13 changed files with 13 additions and 15 deletions

View file

@ -1,4 +1,4 @@
$(document).ready(function() {
document.addEventListener('DOMContentLoaded', () => {
$(".shm-clink").each(function(idx, elm) {
var target_id = $(elm).data("clink-sel");
if(target_id && $(target_id).length > 0) {

View file

@ -1,6 +1,6 @@
/*jshint bitwise:true, curly:true, forin:false, noarg:true, noempty:true, nonew:true, undef:true, strict:false, browser:true, jquery:true */
$(document).ready(function() {
document.addEventListener('DOMContentLoaded', () => {
$(".shm-blotter2-toggle").click(function() {
$(".shm-blotter2").slideToggle("slow", function() {
if($(".shm-blotter2").is(":hidden")) {

View file

@ -189,9 +189,7 @@ function add_selector_button($block) {
$block.click(c); // sometimes the thumbs *is* the A
}
$(function () {
document.addEventListener('DOMContentLoaded', () => {
// Clear the selection, in case it was autocompleted by the browser.
$('#bulk_selected_ids').val("");
});

View file

@ -1,4 +1,4 @@
$(function() {
document.addEventListener('DOMContentLoaded', () => {
function zoom(zoom_type, save_cookie) {
save_cookie = save_cookie === undefined ? true : save_cookie;

View file

@ -1,6 +1,6 @@
/*jshint bitwise:false, curly:true, eqeqeq:true, evil:true, forin:false, noarg:true, noempty:true, nonew:true, undef:false, strict:false, browser:true, jquery:true */
$(function() {
document.addEventListener('DOMContentLoaded', () => {
var blocked_tags = (Cookies.get("ui-blocked-tags") || "").split(" ");
var needs_refresh = false;
for(var i=0; i<blocked_tags.length; i++) {

View file

@ -1,6 +1,6 @@
/*jshint bitwise:true, curly:true, forin:false, noarg:true, noempty:true, nonew:true, undef:true, strict:false, browser:true, jquery:true */
$(function() {
document.addEventListener('DOMContentLoaded', () => {
if(window.notes) {
$('#main_image').load(function(){
$('#main_image').imgNotes({notes: window.notes});

View file

@ -1,6 +1,6 @@
/*jshint bitwise:true, curly:true, forin:false, noarg:true, noempty:true, nonew:true, undef:true, strict:false, browser:true, jquery:true */
$(function() {
document.addEventListener('DOMContentLoaded', () => {
$('#order_pool').change(function(){
var val = $("#order_pool option:selected").val();
Cookies.set("shm_ui-order-pool", val, {path: '/', expires: 365}); //FIXME: This won't play nice if COOKIE_PREFIX is not "shm_".

View file

@ -1,4 +1,4 @@
$(function() {
document.addEventListener('DOMContentLoaded', () => {
var original_width = $("#original_width").val();
var original_height = $("#original_height").val();

View file

@ -1,4 +1,4 @@
$(function() {
document.addEventListener('DOMContentLoaded', () => {
if(Cookies.get("ui-tnc-agreed") !== "true") {
$("BODY").addClass("censored");
$("BODY").append("<div class='tnc_bg'></div>");

View file

@ -348,7 +348,7 @@ class Setup extends Extension
checkbox.disabled = true;
out_span.innerHTML = '(testing...)';
$(document).ready(function() {
document.addEventListener('DOMContentLoaded', () => {
var http_request = getHTTPObject();
http_request.open('GET', '$test_url', false);
http_request.send(null);

View file

@ -1,6 +1,6 @@
/*jshint bitwise:false, curly:true, eqeqeq:true, evil:true, forin:false, noarg:true, noempty:true, nonew:true, undef:false, strict:false, browser:true */
$(document).ready(function() {
document.addEventListener('DOMContentLoaded', () => {
/** Load jQuery extensions **/
//Code via: http://stackoverflow.com/a/13106698
$.fn.highlight = function (fadeOut) {

View file

@ -1,6 +1,6 @@
/*jshint bitwise:true, curly:true, forin:false, noarg:true, noempty:true, nonew:true, undef:true, strict:false, browser:true, jquery:true */
$(function() {
document.addEventListener('DOMContentLoaded', () => {
if($('#updatecheck').length !== 0){
$.getJSON('https://api.github.com/repos/shish/shimmie2/commits', function(data){
var c = data[0];

View file

@ -1,4 +1,4 @@
$(document).ready(function() {
document.addEventListener('DOMContentLoaded', () => {
if(document.location.hash.length > 3) {
var query = document.location.hash.substring(1);