-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
44 lines (39 loc) · 2.03 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Foodpanda Menu Capture</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<style>
.btn-success {
margin-bottom: 10px;
}
.demo img {
position: relative;
left: 40px;
border: 2px green dashed;
}
</style>
</head>
<body>
<div class="btn">
<a class="btn btn-success"
href="javascript:var products = document.getElementsByClassName("dish-name fn p-name"); var prices = document.getElementsByClassName("price-tags-container"); var menu = ""; var i = 0; for (i=0; i< products.length; i++) { var price = prices[i].innerText.replace("NT$",""); var product = products[i].innerText; menu += product +","+ price + "\r\n"; }; document.body.innerHTML = '<div class="collected" style="background:#000;color:#00c400"></div>'; document.getElementsByClassName("collected")[0].innerText = menu; var range = document.createRange(); range.selectNode(document.getElementsByClassName("collected")[0]); window.getSelection().addRange(range); document.execCommand("copy"); alert("menu has been copied to clipboard");">Foodpanda
Menu Capture</a>
</div>
<div class="demo">
<h3>使用說明</h3>
<div>
<p>1.拖曳上列按鈕放至書籤列</p>
<img src="https://i.imgur.com/VhslTTx.gif" alt="bookmark">
</div>
<div>
<p>2.瀏覽任意熊貓店家</p>
<p>3.點選書籤列按鈕 (即得menu清單)</p>
<img src="https://i.imgur.com/JQ96MrD.gif" alt="foodpanda">
</div>
</div>
</body>
</html>