Giter VIP home page Giter VIP logo

cachho / jadeship-browser-extension Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 2.0 1.03 MB

Automatically convert all links on reddit and yupoo to your favorite shopping agent; enrich the page with online information and QC pics.

Home Page: https://jadeship.com/tools/extension

License: GNU General Public License v3.0

Shell 7.52% JavaScript 2.50% TypeScript 88.80% CSS 1.19%
1688 chrome-extension firefox-addon taobao tmall weidian reddit typescript chrome firefox-extension webextension yupoo

jadeship-browser-extension's Introduction

JadeShip.com Extension

Short summary: Automatically convert all links on reddit and yupoo to your favorite shopping agent; enrich the page with online information and QC pics.

Summary: My Agent Extension - automatically convert all links on reddit and yupoo to your favorite agent; enrich the page with online information, sales statistics and QC pictures. Works with all shopping agents and the Weidian, Taobao and 1688 marketplaces.

Formerly known as "My Agent Extension by RepArchive"


This extension is an essential quality of life upgrade for you as a customers of Chinese shopping sites (Taobao, Weidian, 1688), whether you're browsing the shopping site itself, via an agent or looking on reddit - you get link conversions, QC pics, prices and more.

It rewrites all links to your preferred shopping agent. (This includes shopping agent links and direct links to taobao.com and weidian.com.)

Pages become enriched with extra information about the products you're seeing, you get sales stats from www.jadeship.com and QC pics from finds.ly.

This leaves you with a seamless shopping experience, where you don't have to worry about the agents that others use. This extension turns the experience into a "click and buy" experience - like it should be.

Some other features:

  • convert links on reddit.com and yupoo.com
  • shows you if quality control (QC) pics are available on finds.ly
  • convert from any agent or marketplace to any agent or no agent (if you prefer)
  • handles shortened links (pandabuy.page.link, pandabuy.app.link, weidian.info, l.acbuy.com, etc.)
  • countless display options
  • freedom to opt out of all online features and the affiliates program.

Supported pages:

  • Supported shopping agents: Support for the biggest list of shopping agents any tool has to offer, from classics such as Superbuy, Cssbuy and Sugargoo, to neo-agents such as AllChinaBuy, Hoobuy and Mulebuy.
  • Support for legacy agents: supports for defunct agents is kept so that you can convert those old links, for instance Pandabuy, Hagobuy and Wegobuy.
  • Supported marketplaces/platforms: weidian.com, taobao.com, 1688.com, tmall.com
  • Supported pages: Reddit, Yupoo, all shopping agents.

Safety & Privacy:

  • the source code is open source, so anyone can review it and contribute
  • minimalist approach, only ~0.2mb in size.
  • the extension is only active on required sites, the URLs are matched very carefully.
  • you can opt out of all online interactions and run the extension offline
  • no user data is collected (with each request you do technically expose your IP, among other information).

This is a free and open source project, available at: https://github.com/cachho/jadeship-browser-extension

Installation for Users

You can install the extension from the Chrome Web Store or Firefox Browser Add-Ons.

Side Loading

Alternatively, to use pre-release versions you can clone the repository and build from source (npm install and npm run build commands are all you need). Then install the zip files.

If you don't want to build from source, you can check this repo's releases page to directly download the zip files, ready for installation.

Development

This extension uses one codebase for firefox and chromium browsers.

Before you do anything else, clone the repository. Install the dependencies with npm install.

Codebase

This project is written in typescript.

Virtually all dependencies are for the developer experience and code maintainability.

current state: this project has gotten more ambitious than I initially anticipated. All the maintenance packages have been added after the majority of the code has been written. It's also my first browser extension. That's why some parts might be unconventional.

Testing in the browser

For testing on chromium and firefox you need to compile the typescript files. For this purpose you should have the typescript compiler installed globally (npm install -g typescript).

Webpack allows for hot reloads by running npm run watch.

If you change anything, you always have to reload the extension in the browser. Because chrome can load unpacked files, it's quicker and recommended for developing, however both browsers must remain compatible.

Test Suite: There is a subreddit that's specifically built to put all links that this extension has to work with in front of you: https://www.reddit.com/r/RADev/?f=flair_name%3A%22Test%22

Chromium

Chromium allows you to use use an unpacked folder, so running npm run dev or npm run watch is enough. The project is setup in a way, where you can go to chrome://extensions/, and load the root folder with manifest.json inside, it automatically points to the tsc-compiled files from inside build/. If you want to make sure everything works with the packaged zip, drag dist/chromium.zip into the chrome://extensions/ window.

Firefox

The extension needs to be packed as a zip. To do so run npm run build. It can then be found at dist/firefox.zip. Again, if you change anything you have to run the build script again.

In Firefox, to test it in the browser, you have to load the zipped extension (dist/firefox.zip) as a temporary addon. This can be done at about:debugging#/runtime/this-firefox.

To do / future developments

There's no reason this should only work on reddit. We can expand beyond that. However, for reasons of security, trust and performance, wildcard permissions for every site have to be avoided. That means that every site this extension is supposed to work on has to be defined in the manifest. If you have any other site this could work with, please open an issue.

I tried google sheets, but it seems very hard to modify the html there.

Bugs / Issues / Support

The following site can be used to quickly report bugs: https://www.jadeship.com/report?service=Browser+Extension

It's even better if you open an issue here on github, so we can methodically fix the issue.

Disclaimer

Not affiliated with reddit.com, weidian.com, taobao.com, tmall.com, 1688.com, or any of the agent pages listed in the manifest. We do not represent those websites or companies.

jadeship-browser-extension's People

Contributors

cachho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jadeship-browser-extension's Issues

Bug: Firefox - Extension only works when clicked

On firefox, there seem to be two permission levels, run when clicked and always run for a domain (in this case reddit.com), by default this extension only runs when clicked. Users can manually give it the permission to always run on reddit

In order to get it to give the permission to always run on a domain by default, it has to list the host permissions under "core permissions", not "optional permissions".

This is not the intended behavior, as it's supposed to replace links in the background.

[BUG] Reddit Mod Queue issues

It seems like the mod queue is constantly refreshing data, which causes the extension to flash there as well.

It's best to just disable it on this page.

[FEATURE] Add Support for Shortened Taobao Links

This can't be done in this codebase, it's a server side function I have to implement. But it still needs to be called from this extension.

The only link I found so far is down, but they look like this: https://m.tb.cn/h.fIAAnLW?tk=gVmu298qEZy「guidi鬼帝788马臀皮水洗后拉链靴女做旧褶皱中筒靴粗跟真皮底倒靴

[BUG] ezbuycn does not work

Ezbuy website does not work, it is clear the url construction wouldn't work, but it can't be tested and fixed as long as the website isn't working.

[BUG] Toolbar not working under high loads

I encountered an issue where the toolbar did not work under an extremely high load, where other programs on my PC quit working too. After a clean install it worked again, so hopefully it had to do with the renamed localStorage key (banner => toolbar).

This issue might have to do with the fact that the toolbar loads after the page (document) is loaded. Under high load some parts of the page might not load, so the toolbar is never injected. That's my theory. I will experiment with loading the script earlier.

Disable Extension in writeable fields

Writeable fields like reddit comments or posts, that directly interpret the tag as such, are visually distracting and lead to a weird situation where you can't delete your text.

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.