From 8766d09bc0c142b86ea8f2bb6622f9d24e8601b6 Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Fri, 5 Jun 2020 14:48:01 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A1=20Add=20jshint=20to=20all=20user?= =?UTF-8?q?=20scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- amaz.giveaway.user.js | 3 ++- comicextra.user.js | 3 ++- cookie.clicker.user.js | 6 ++++-- fullcomic.user.js | 3 ++- giveaway.hide.crap.user.js | 3 ++- giveaway.user.js | 4 +++- readcomiconline.user.js | 5 ++--- trakt.pick-show.user.js | 3 ++- trakt.scraper.user.js | 3 ++- trakt.simplifier.user.js | 4 +++- viewcomic.scraper.user.js | 3 ++- wheniwork.hours.user.js | 12 ++++++++---- 12 files changed, 34 insertions(+), 18 deletions(-) diff --git a/amaz.giveaway.user.js b/amaz.giveaway.user.js index 90fe911..3d3b308 100644 --- a/amaz.giveaway.user.js +++ b/amaz.giveaway.user.js @@ -4,11 +4,12 @@ // @description Allow removal of visited links on Amazon Giveaway Listing // @include https://smile.amazon.com/ga/giveaways* // @include https://www.amazon.com/ga/giveaways* -// @version 1.9.1 +// @version 1.9.2 // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js // ==/UserScript== /* global jQuery */ +/* jshint esversion: 6 */ (function ($) { 'use strict'; diff --git a/comicextra.user.js b/comicextra.user.js index b31925a..61e2e00 100644 --- a/comicextra.user.js +++ b/comicextra.user.js @@ -2,7 +2,7 @@ // ==UserScript== // @name Comic Extra Scraper // @namespace danielrayjones -// @version 0.0.4 +// @version 0.0.5 // @description Scrape comics from comicextra.com // @author Dan Jones // @match https://www.comicextra.com/* @@ -13,6 +13,7 @@ // ==/UserScript== /* global jQuery, JSZip */ +/* jshint esversion: 6 */ console.log('will scrape comics'); diff --git a/cookie.clicker.user.js b/cookie.clicker.user.js index c126745..27dbfe5 100644 --- a/cookie.clicker.user.js +++ b/cookie.clicker.user.js @@ -3,9 +3,11 @@ // @namespace danielrayjones // @description Plays Cookie Clicker for you // @include http://orteil.dashnet.org/cookieclicker/ -// @version 0.0.3 +// @version 0.0.4 // ==/UserScript== +/* jshint esversion: 6 */ + let AutoClicker = {stop: false}; unsafeWindow.AutoClicker = AutoClicker; @@ -28,7 +30,7 @@ window.addEventListener('load', function () { console.log('clicking', shimmer); shimmer.click(); }); - }) + }); }); shimmerObserver.observe(shimmers, { childList: true}); diff --git a/fullcomic.user.js b/fullcomic.user.js index 2ec5102..e3f9217 100644 --- a/fullcomic.user.js +++ b/fullcomic.user.js @@ -2,7 +2,7 @@ // ==UserScript== // @name Full Comic Scraper // @namespace danielrayjones -// @version 0.0.3 +// @version 0.0.4 // @description Scrape comics from fullcomic.pro // @author Dan Jones // @match http://fullcomic.pro/* @@ -13,6 +13,7 @@ // ==/UserScript== /* global jQuery, JSZip */ +/* jshint esversion: 6 */ console.log('will scrape comics'); diff --git a/giveaway.hide.crap.user.js b/giveaway.hide.crap.user.js index 85ca0a6..6d8646c 100644 --- a/giveaway.hide.crap.user.js +++ b/giveaway.hide.crap.user.js @@ -3,11 +3,12 @@ // @namespace danielrayjones // @description Remove stuff I don't like from Amazon Giveaway Listing // @include https://giveawaylisting.com/ -// @version 1.0 +// @version 1.0.1 // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js // ==/UserScript== /* global $ */ +/* jshint esversion: 6 */ var hide = function(text) { $('#giveaways a:contains("' + text +'")') diff --git a/giveaway.user.js b/giveaway.user.js index a07fba6..406e7f2 100644 --- a/giveaway.user.js +++ b/giveaway.user.js @@ -3,10 +3,12 @@ // @namespace danielrayjones // @description Allow removal of visited links on Amazon Giveaway Listing // @include https://giveawaylisting.com/ -// @version 1.3 +// @version 1.3.1 // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js // ==/UserScript== +/* jshint esversion: 6 */ + var checked = false; var hideOne = function(el) { diff --git a/readcomiconline.user.js b/readcomiconline.user.js index 87c276e..17c959f 100644 --- a/readcomiconline.user.js +++ b/readcomiconline.user.js @@ -2,7 +2,7 @@ // ==UserScript== // @name Read Comic Online Scraper // @namespace danielrayjones -// @version 0.0.2 +// @version 0.0.3 // @description Scrape comics from readcomiconline.to // @author Dan Jones // @match https://readcomiconline.to/* @@ -13,8 +13,7 @@ // ==/UserScript== /* global jQuery, JSZip */ - -//console.log('will scrape comics'); +/* jshint esversion: 6 */ (function($) { 'use strict'; diff --git a/trakt.pick-show.user.js b/trakt.pick-show.user.js index 7ee5315..1aa8727 100644 --- a/trakt.pick-show.user.js +++ b/trakt.pick-show.user.js @@ -2,7 +2,7 @@ // ==UserScript== // @name Trakt Show Picker // @namespace danielrayjones -// @version 0.0.3 +// @version 0.0.4 // @description Pick a show from progress page // @author Dan Jones // @match https://trakt.tv/users/*/progress* @@ -11,6 +11,7 @@ // ==/UserScript== /* global $, compressedCache, localStorage */ +/* jshint esversion: 6 */ (function() { 'use strict'; diff --git a/trakt.scraper.user.js b/trakt.scraper.user.js index dfada34..82d10bc 100644 --- a/trakt.scraper.user.js +++ b/trakt.scraper.user.js @@ -2,7 +2,7 @@ // ==UserScript== // @name Trakt Scraper // @namespace danielrayjones -// @version 0.0.5 +// @version 0.0.6 // @description Scrape lists of shows/movies from Trakt and download a JSON file // @author Dan Jones // @match https://trakt.tv/* @@ -11,6 +11,7 @@ // ==/UserScript== /* global $, compressedCache, localStorage */ +/* jshint esversion: 6 */ (function() { 'use strict'; diff --git a/trakt.simplifier.user.js b/trakt.simplifier.user.js index 4e04746..455372f 100644 --- a/trakt.simplifier.user.js +++ b/trakt.simplifier.user.js @@ -2,13 +2,15 @@ // ==UserScript== // @name Trakt Simplifier // @namespace danielrayjones -// @version 0.0.2 +// @version 0.0.3 // @description Strip out eps/movies from trakt lists based on a query string // @author Dan Jones // @match https://trakt.tv/* // @grant none // ==/UserScript== +/* jshint esversion: 6 */ + (function() { 'use strict'; diff --git a/viewcomic.scraper.user.js b/viewcomic.scraper.user.js index 3945755..1a67aec 100644 --- a/viewcomic.scraper.user.js +++ b/viewcomic.scraper.user.js @@ -2,7 +2,7 @@ // ==UserScript== // @name Viewcomic Scraper // @namespace danielrayjones -// @version 0.0.8 +// @version 0.0.9 // @description Scrape comics from viewcomic.com // @author Dan Jones // @match http://viewcomic.com/* @@ -13,6 +13,7 @@ // ==/UserScript== /* global jQuery, JSZip */ +/* jshint esversion: 6 */ (function($) { 'use strict'; diff --git a/wheniwork.hours.user.js b/wheniwork.hours.user.js index 45cae33..41d49af 100644 --- a/wheniwork.hours.user.js +++ b/wheniwork.hours.user.js @@ -1,13 +1,15 @@ +// -*- tab-width: 4; js-indent-level: 4; -*- // ==UserScript== // @name WhenIWork True Total Worked // @namespace danielrayjones // @description Adds the Total hours worked, including today // @include https://app.wheniwork.com/payroll/ -// @version 0.2 +// @version 0.2.1 // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js // ==/UserScript== /* global $ */ +/* jshint esversion: 6 */ $(document).ready(function() { 'use strict'; @@ -23,7 +25,7 @@ $(document).ready(function() { currentHourSum = hours; let weekPlusDayTotal = $('#week-plus-day-total'); - let span = `Total with Today${hours}` + let span = `Total with Today${hours}`; if (weekPlusDayTotal.length === 0) { $('#header-summary-container .stats').append( @@ -34,7 +36,7 @@ $(document).ready(function() { } // In case this ran while the page was loading, let's try again in two seconds. - setTimeout(addHours, 2000); + return setTimeout(addHours, 2000); } function addHours() { @@ -52,8 +54,10 @@ $(document).ready(function() { if (currentHourSum === 0 && hourSum === 0) return setTimeout(addHours, 2000); if (currentHourSum !== hourSum && hourSum > 0) { - updateHours(hourSum); + return updateHours(hourSum); } + + return null; } // The hours don't show up until after an AJAX request completes.