Code Monkey home page Code Monkey logo

the-pirate-calendar's People

Contributors

luffier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

the-pirate-calendar's Issues

Add support for watchlist page

First off, thanks for this script! Very useful, will save me some keypresses :)

I generally use my watchlist as the start point for searches. Would it be possible to add the button to all the items on a list page?

Suggestion

Hello,

Just wanted to show a possible migration path for this script for GMC (I left the whitespace changes in this diff).

--- /scripts/luffier/The_Pirate_Calendar_(for_trakt.tv)/[email protected]+0371fdc
+++ /scripts/luffier/The_Pirate_Calendar_(for_trakt.tv)/source
@@ -7,11 +7,13 @@
 // @license      MIT
 // @match        *://trakt.tv/
 // @match        *://trakt.tv/*
-// @require      https://cdn.jsdelivr.net/gh/sizzlemctwizzle/GM_config@43fd0fe4de1166f343883511e53546e87840aeaf/gm_config.js
+// @require      https://openuserjs.org/src/libs/sizzle/GM_config.js
 // @grant        GM_addStyle
 // @grant        GM_listValues
 // @grant        GM_getValue
 // @grant        GM_setValue
+// @grant        GM.getValue
+// @grant        GM.setValue
 // @grant        GM_deleteValue
 // @grant        GM_registerMenuCommand
 // @grant        unsafeWindow
@@ -216,7 +218,7 @@
                 }
             `,
         'events': {
-            'init': function() { } ,
+            'init': myInit,
             'open': function() {
                 // Set default URL and search path when the search engine changes
                 this.fields.torrentSearchEngine.node.addEventListener('change', function() {
@@ -505,13 +507,15 @@
         }
     }
 
-    // Apply styles
-    $('head').append(createElement(style));
+    function myInit() {
+        // Apply styles
+        $('head').append(createElement(style));
+    
+        validateSettings();
+    
+        processPage();
+    
+        applySettings();
+    }
 
-    validateSettings();
-
-    processPage();
-
-    applySettings();
-
 })();
\ No newline at end of file

Your script is well written to adapt to the asynchronous change. Hope you consider the improvement since it's quite easily done.

Thanks for the look.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.