migrate to typescript, with fixes
This commit is contained in:
7
template/assets/bootstrap.min.css
vendored
Normal file
7
template/assets/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
template/assets/console.png
Normal file
BIN
template/assets/console.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
73
template/html/popup.html
Normal file
73
template/html/popup.html
Normal file
@ -0,0 +1,73 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<link>
|
||||
<meta charset="utf-8">
|
||||
<title>Data Extractor</title>
|
||||
<script charset="UTF-8" type="text/javascript" src="../scripts/popup.bundle.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../assets/bootstrap.min.css">
|
||||
</head>
|
||||
|
||||
<body style="margin: 20px 10px;">
|
||||
<div class="container-fluid" style="min-width: 420px;">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h6>Usage</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="alert alert-info small">
|
||||
<p>
|
||||
Goto <a href="#" id="link-extension-detail">Extension Detail</a>, click "backgroud page",
|
||||
and type your scripts in the console.
|
||||
</p>
|
||||
<p>
|
||||
<img src="../assets/console.png" alt=""
|
||||
style="max-width: 489px; width: 100%; border-radius: 5px">
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h6>Quick Start</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="alert alert-success small">
|
||||
<p>
|
||||
<b>Extract current page</b>:
|
||||
<br>> $(".list-item", ["a.title", "p.content"]);
|
||||
</p>
|
||||
<p>
|
||||
<b>Extract multiple pages (1-10, interval 1)</b>:
|
||||
<br>> job=new Extractor().task(".list-item", ["a.title", "p.content"],
|
||||
"http://sample.com/?pn=${page}", 1, 10, 1);
|
||||
<br>> job.start();
|
||||
|
||||
</p>
|
||||
<p>
|
||||
<b>Full document at:</b>
|
||||
<br>
|
||||
<a href="#" id="link-document">https://git.jebbs.co/jebbs/data-extracter-extesion</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h6>Saved State</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<input type="file" name="state" id="state-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
template/icon.png
Normal file
BIN
template/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
34
template/manifest.json
Executable file
34
template/manifest.json
Executable file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Data Extracter",
|
||||
"version": "0.5.1",
|
||||
"author": "jebbs",
|
||||
"description": "Extract data from web page elements as sheet.",
|
||||
"icons": {
|
||||
"16": "icon.png",
|
||||
"48": "icon.png",
|
||||
"128": "icon.png"
|
||||
},
|
||||
"browser_action": {
|
||||
"default_icon": "icon.png",
|
||||
"default_popup": "html/popup.html",
|
||||
"default_title": "Data Extracter"
|
||||
},
|
||||
"background": {
|
||||
"scripts": [
|
||||
"scripts/background.bundle.js"
|
||||
],
|
||||
"persistent": false
|
||||
},
|
||||
"content_scripts": [{
|
||||
"matches": ["*://*/*"],
|
||||
"js": [
|
||||
"scripts/content.bundle.js"
|
||||
],
|
||||
"run_at": "document_idle"
|
||||
}],
|
||||
"permissions": [
|
||||
"activeTab",
|
||||
"notifications"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user