mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
add popup page
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "HTML5 Video Playback Speed Controller",
|
"name": "Video Speed Controller",
|
||||||
"version": "0.1.3",
|
"version": "0.2.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"description": "Lean in and speed up your video learning with handy shortcuts to accelerate, slow-down, and rewind your video via your keyboard.",
|
"description": "Speed up, slow down, and rewind any HTML5 video with quick shortcuts.",
|
||||||
"homepage_url": "https://github.com/igrigorik/videospeed",
|
"homepage_url": "https://github.com/igrigorik/videospeed",
|
||||||
"icons": {
|
"icons": {
|
||||||
"16": "icons/icon16.png",
|
"16": "icons/icon16.png",
|
||||||
@@ -11,6 +11,14 @@
|
|||||||
},
|
},
|
||||||
"permissions": [ "activeTab", "storage" ],
|
"permissions": [ "activeTab", "storage" ],
|
||||||
"options_page": "options.html",
|
"options_page": "options.html",
|
||||||
|
"browser_action": {
|
||||||
|
"default_icon": {
|
||||||
|
"19": "images/icon16.png",
|
||||||
|
"38": "images/icon48.png"
|
||||||
|
},
|
||||||
|
"default_icon": "icons/icon48.png",
|
||||||
|
"default_popup": "popup.html"
|
||||||
|
},
|
||||||
"content_scripts": [{
|
"content_scripts": [{
|
||||||
"all_frames": true,
|
"all_frames": true,
|
||||||
"matches": [ "http://*/*", "https://*/*"],
|
"matches": [ "http://*/*", "https://*/*"],
|
||||||
@@ -18,4 +26,4 @@
|
|||||||
"js": [ "inject.js" ]
|
"js": [ "inject.js" ]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
23
popup.css
Normal file
23
popup.css
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
body {
|
||||||
|
min-width: 8em
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
width: 100%;
|
||||||
|
border: 0;
|
||||||
|
height: 0;
|
||||||
|
border-top: 1px solid rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
background-image: linear-gradient(#EDEDED, #EDEDED 38%, #DEDEDE);
|
||||||
|
border: 1px solid rgba(0,0,0,0.25);
|
||||||
|
border-radius: 2px;
|
||||||
|
outline: none;
|
||||||
|
box-shadow: 0 1px 0 rgba(0,0,0,0.08), inset 0 1px 2px rgba(255,255,255,0.75);
|
||||||
|
color: #444;
|
||||||
|
text-shadow: 0 1px 0 rgb(240,240,240);
|
||||||
|
font: inherit;
|
||||||
|
user-select: none;
|
||||||
|
}
|
14
popup.html
Normal file
14
popup.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Video Speed Controller: Popup</title>
|
||||||
|
<link rel="stylesheet" href="popup.css" />
|
||||||
|
<script src="popup.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button id="config">Configure</button>
|
||||||
|
<hr />
|
||||||
|
<button id="feedback">Send feedback</button>
|
||||||
|
<button id="about">About</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
popup.js
Normal file
13
popup.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
document.querySelector('#config').addEventListener('click', function() {
|
||||||
|
window.open(chrome.extension.getURL("options.html"));
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelector('#about').addEventListener('click', function() {
|
||||||
|
window.open("https://github.com/igrigorik/videospeed");
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelector('#feedback').addEventListener('click', function() {
|
||||||
|
window.open("https://github.com/igrigorik/videospeed/issues");
|
||||||
|
});
|
||||||
|
});
|
Reference in New Issue
Block a user