GithubHelp home page GithubHelp logo

theonefred / proxyee-down-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from proxyee-down-org/proxyee-down-extension

0.0 2.0 0.0 97 KB

Proxyee Down extendsion repository.

JavaScript 100.00%

proxyee-down-extension's Introduction

Proxyee Down 扩展仓库

根目录下每个文件夹代表一个扩展,文件夹里必须包含一个manifest.json文件。

manifest.json

通过这个文件来配置插件相关信息,例如:

{
  "title": "百度云下载插件",
  "version": 0.1,
  "description": "可以直接获取下载链接并推送到Proxyee Down下载",
  "proxyWildcards": ["pan.baidu.com", "yun.baidu.com", "d.pcs.baidu.com"],
  "sniffRegexs": [],
  "contentScripts": [
    {
      "matches": ["^(pan|yun).baidu.com/disk/home.*$"],
      "scripts": ["common.js", "home.js"]
    },
    {
      "matches": ["^(pan|yun).baidu.com/(s/|share/link).*$"],
      "scripts": ["common.js", "share.js"]
    }
  ]
}

title

扩展的名称

version

扩展的版本号,当检测到有更大的版本号时,扩展就会提示更新。

description

扩展的描述

proxyWildcards

域名通配符列表,代理服务器会在指定的域名通配符中生效

sniffRegexs

正则表达式列表,会嗅探匹配的正则表达式列表的url请求,当请求为下载请求时会调用Proxyee Down进行下载

contentScripts

配置扩展注入 js 的条件,可以配置多个。

  • matches

    当浏览器url匹配到这里的正则表达式时,就会将 js 注入至对应的页面。

  • scripts

    matches生效时,注入扩展目录下指定的 js 文件。

贡献插件

  1. 首先 fork 此仓库
  2. 创建一个插件目录
  3. 编写manifest.json脚本
  4. 编写README.md文件
  5. 提交 PR

API

插件脚本中可以访问pdown对象,目前支持以下方法:

方法名 参数 异步 说明
resolve (request) 根据请求解析出响应的相关信息(大小、文件名、是否支持断点下载)
resolveAsync (request, onSuccess, onError) 根据请求解析出响应的相关信息(大小、文件名、是否支持断点下载)
createTask (request, response) 创建一个任务,会唤醒 proxyee-down 并弹出下载框
pushTask (taskFom, onSuccess, onError, refresh) 创建一个任务,不弹下载框直接在后台下载
getDownConfig () 取下载相关配置信息
getCookie (url) 取目标网站的cookie,需要被代理服务器访问才能生效

proxyee-down-extension's People

Contributors

monkeywie avatar

Watchers

James Cloos avatar  avatar

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.