Skip to content

Commit

Permalink
Docs-更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
jinwyp committed Dec 17, 2021
1 parent b622805 commit 841c566
Show file tree
Hide file tree
Showing 12 changed files with 558 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,51 @@ dist

# TernJS port file
.tern-port











# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea/


## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/


# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties





# Ignore Mac OS desktop services store
*.DS_Store


# Ignore Windows desktop setting file
desktop.ini
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# shopeed
## Shopeed a shopping assistant chrome extensions. Get Cookie chrome extensions
## 买好得 购物助手 优惠券 京东优惠
### 获取JD或网站的 Cookie 浏览器插件

### 功能说明 Features

1. 方便获取JD 或其他网站的Cookies

### 功能说明 Introduction

![功能说明](https://github.com/jinwyp/tgfcerblock/blob/master/docs/cookie.jpg?raw=true)


### 使用方法 Chrome Usage

1. 下载Chrome版本, 地址在项目的releases 页面 jdcookie.zip
2. 解压zip文件到任意文件夹
3. 打开chrome 浏览器 输入chrome://extensions/ 或 通过菜单进入扩展程序页面
4. 点击右上角开启开发者模式, 然后点击左上的 "加载已解压的扩展程序" 按钮 选择之前解压的文件夹即可
5. 打开京东页面 https://m.jd.com/ 然后登录, 输入账号密码登录成功
6. 进入该插件 点击 "显示Cookie" 按钮即可

Binary file added docs/jdcookie.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions jdcookie/chrome/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
console.log("+++++ ===== Chrome Extension background script running!")


let color = '#3aa757';

chrome.runtime.onInstalled.addListener(() => {
// console.log('Default background color set to %cgreen', `color: ${color}`);
});

/*
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
console.log("request: ", request)
console.log("sender: ", sender)
console.log("sendResponse: ", sendResponse)
sendResponse({test:'test'})
})
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.create({url: 'popup.html'})
chrome.runtime.openOptionsPage(()=>{console.log("Chrome Extension Open Options page")});
});
chrome.tabs.onActivated.addListener( (currentTab) => {
chrome.tabs.get(currentTab.tabId, ( currentTabInfo) => {
console.log("currentTabInfo: ", currentTabInfo.url);
const regex1 = /^https:\/\/club\.tgfcer\.com\/thread/;
const regex2 = /^https:\/\/wap.tgfcer.com\/index.php\?action=thread/;
console.log(regex1.test(currentTabInfo.url));
if (regex1.test(currentTabInfo.url) || regex2.test(currentTabInfo.url)) {
chrome.tabs.executeScript(null,{
file: "./content.js"
}, ()=> {console.log("Chrome Extension Script Inject Programmatically! ")});
}
})
})
*/
7 changes: 7 additions & 0 deletions jdcookie/chrome/bootstrap.min.css

Large diffs are not rendered by default.

Binary file added jdcookie/chrome/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added jdcookie/chrome/images/icon_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added jdcookie/chrome/images/icon_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added jdcookie/chrome/images/icon_48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions jdcookie/chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "JDCookie",
"version": "1.0",
"description": "Show JD cookies",
"author": "JinWYP",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"action": {
"default_title": "TGFCER Block User",
"default_popup": "popup.html",
"default_icon": {
"16": "images/icon_16.png",
"32": "images/icon_48.png",
"48": "images/icon_48.png",
"128": "images/icon_128.png"
}
},
"permissions": [
"activeTab", "tabs",
"scripting",
"clipboardWrite",
"clipboardRead",
"notifications",
"declarativeContent",
"storage", "cookies"
],

"host_permissions": ["<all_urls>"],
"icons": {
"16": "images/icon_16.png",
"32": "images/icon_48.png",
"48": "images/icon_48.png",
"128": "images/icon_128.png"
}


}
81 changes: 81 additions & 0 deletions jdcookie/chrome/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="./bootstrap.min.css">
<title>Popup</title>


<style>
.main {
width: 900px;
margin: 6px 0px;
}

.main div {
font-size: 14px;
}

.underline {
margin: 5px 0px;
height: 1px;
background-color: #cccccc;
}
</style>
</head>

<body>

<div class="container-fluid main">

<div class="row">
<div class="col-sm-3">
<h4>Cookie 列表 </h4>
</div>
<div class="col-sm-4">
<h5>请先登录 <a href="https://m.jd.com/" target="_blank">https://m.jd.com/</a> </h5>
</div>
</div>

<form id="formType" class="mt-2 ">

<div class="form-group row">
<label for="input-searchtext" class="col-sm-3">请输入京东的域名:</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="input-domaintext" placeholder="https://home.m.jd.com">
</div>
<div class="col-sm-3">
<button type="button" class="btn btn-outline-info" id="btn-search">显示Cookie</button>
</div>
</div>

</form>

<div class="card mb-2">
<div class="card-body">
<h5 class="card-title mb-3">请复制以下Cookie: pt_key pt_pin (点击文字即可复制到剪贴板)</h5>

<p class="card-text" id="jd_pt_key_pin">pt_key and pt_pin 暂无</p>
<p class="card-text" id="jd_pt_key">pt_key 暂无</p>
<p class="card-text" id="jd_pt_pin">pt_pin 暂无</p>
</div>
</div>

<div class="card mb-4">
<div class="card-body mb-1">
<input type="text" class="form-control" id="input-searchtext" placeholder="请填入筛选的Cookie Name 名称">
</div>
<ul class="list-group" id="cookie-list">
<li class="list-group-item"> 暂无 </li>
</ul>
</div>


</div>


<script src="popup.js"></script>
</body>

</html>
Loading

0 comments on commit 841c566

Please sign in to comment.