Skip to content

How to Make Local Development Debug

Rick Lee edited this page Feb 14, 2022 · 4 revisions
  • Edit Chrome extension function of Tampermonkey first to allow access to local file.
Local file access can be given to an extension at the extension management page. Go to the settings page (chrome://settings/) and choose extensions at the left.

Now search for the Tampermonkey entry and enable the "Allow access to file URIs" checkbox.
  • git clone [email protected]:techmovie/easy-upload.git

  • cd easy-upload,run yarn command to installation dependencies.

  • run yarn dev, as file changes, script in .cache directory changes automatically.

  • Open a new user script in Tampermonkey extension of the browser and copy following contents into it, then change the file path of @require to the absolute path of .cache/easy-upload.user.js in your local project. When local files change,just reload the browser the changes will be effected.

// ==UserScript==
// @name         debug
// @namespace    https://github.com/techmovie/easy-upload
// @version      ${version}
// @description  ${description}
// @author       ${author}
// @require      https://cdn.bootcss.com/jquery/1.7.1/jquery.min.js
// @match        https://passthepopcorn.me/torrents.php?id=*
// @match        http://*/details.php?id=*
// @match        https://*/details.php?id=*
// @match        https://totheglory.im/t/*
// @match        https://beyond-hd.me/torrents/*
// @match        https://lemonhd.org/upload_*
// @match        https://lemonhd.org/details*
// @match        https://blutopia.xyz/torrents/*
// @match        https://blutopia.xyz/torrents?*
// @match        https://blutopia.xyz/upload/*
// @match        https://pt.hdpost.top/torrents?*
// @match        https://pt.hdpost.top/torrents/*
// @match        https://asiancinema.me/torrents/*
// @match        https://asiancinema.me/torrents?*
// @match        https://*/upload*
// @match        http://*/upload*
// @match        http://www.hd.ai/Torrents.upload
// @match        http://www.hd.ai/Torrents.index?*
// @match        https://broadcity.in/browse.php?imdb=*
// @match        https://ptpimg.me
// @grant        GM_addStyle
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_openInTab
// @grant        GM_xmlhttpRequest
// @grant        GM_setClipboard
// @require      file:///Users/YOURNAME/xxx/easy-seed/.cache/easy-upload.user.js
// ==/UserScript==
(function() {
    'use strict';
})();
  • run yarn commit to commit changes.

  • run yarn build to create a new script in dist directory.

Clone this wiki locally