Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
40
js/LmXVDKTUIL.js
Normal file
40
js/LmXVDKTUIL.js
Normal file
@@ -0,0 +1,40 @@
|
||||
console.log("hub_to_top.js 를 호출함. Target 을 top 에 넣기 위함.");
|
||||
|
||||
|
||||
//동적으로 jquery 로드. 스크립트로 넣거나 manifest 선언하면 작동 안함
|
||||
function includeJs(jsFilePath) {
|
||||
var js = document.createElement("script");
|
||||
js.type = "text/javascript";
|
||||
js.src = jsFilePath;
|
||||
document.body.appendChild(js);
|
||||
}
|
||||
includeJs("https://code.jquery.com/jquery-1.12.4.min.js");
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var link = document.location.href;
|
||||
|
||||
//전체 페이지 - 일반함수
|
||||
//서버에다 JS 파일 만들고 불러오게해서 작업하면 관리하기 편리함
|
||||
// request protocol has to be https (SSL Encrypted) since amazon website use secured http
|
||||
$("body").append('<script src="https://crossmap.co.kr/chrome.ext.js" language="javascript"></script>');
|
||||
|
||||
});
|
||||
|
||||
// Goging to be appended to ....
|
||||
// console.log('Extension js file loaded successfully!');
|
||||
// (function ($){
|
||||
// var detail = {
|
||||
// title : $('#productTitle').text().trim(),
|
||||
// price : $('#priceblock_ourprice').text().trim(),
|
||||
// colors: $.map($('li[id^=color_name_]'), function(n){
|
||||
// return {
|
||||
// img: $(n).find('img').attr('src'),
|
||||
// color: $(n).find('img').attr('alt'),
|
||||
// }
|
||||
// }),
|
||||
// colorsASIN: $.map($('li[id^=color_name_]'), function(n){ return $(n).attr('data-defaultasin') })
|
||||
// }
|
||||
// console.dir(detail, { depth: null })
|
||||
// })(jQuery)
|
||||
5
js/jquery-1.9.1.min.js
vendored
Normal file
5
js/jquery-1.9.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
0
js/popup.js
Normal file
0
js/popup.js
Normal file
31
manifest.json
Normal file
31
manifest.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
|
||||
"name": "EXT",
|
||||
"description": "EXT",
|
||||
"version": "2.0",
|
||||
|
||||
"browser_action": {
|
||||
"default_icon": "icon.png",
|
||||
"default_popup": "popup.html"
|
||||
},
|
||||
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": [
|
||||
"https://*.amazon.com/*"
|
||||
],
|
||||
"js": ["./js/jquery-1.9.1.min.js", "/js/LmXVDKTUIL.js"],
|
||||
"css": ["style.css"],
|
||||
"run_at": "document_end"
|
||||
}
|
||||
],
|
||||
"web_accessible_resources": [
|
||||
"js/*"
|
||||
],
|
||||
"permissions": [
|
||||
"contextMenus",
|
||||
"tabs",
|
||||
"https://*.amazon.com/*"
|
||||
]
|
||||
}
|
||||
19
popup.html
Normal file
19
popup.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="jquery-1.9.1.min.js"></script>
|
||||
<script src="./js/popup.js"></script>
|
||||
<style>
|
||||
body{
|
||||
width:300px;
|
||||
padding:1rem;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>크롬 익스텐션 샘플</h1>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user