Skip to content

Commit 61a358c

Browse files
committed
edit the options page
1 parent b4f7b21 commit 61a358c

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/options.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@
8686
<div class="margin-top-10">
8787
<label class="block">Web Activity Time Tracker tracks your activity, if you active in browser (mouse
8888
or keyboard).
89-
In order for the extension to also track when you watch a video on YouTube.com, you need grant
89+
In order for the extension to also track when you watch a video on YouTube / Netflix, you need grant
9090
permission to
9191
access the sites.
9292
It is necessary that extension will get access to DOM (Document Object Model).</label>
93+
</div>
94+
<div class="margin-top-10">
95+
<label class="block">YouTube</label>
9396
<input class="margin-top-10" type="button" value="Grant permission" id='grantPermissionForYT'>
9497
<div class="inline-block">
9598
<div id='permissionSuccessedBlockForYT' hidden>
@@ -100,12 +103,7 @@
100103
</div>
101104
<!-- Netflix -->
102105
<div class="margin-top-10">
103-
<label class="block">Web Activity Time Tracker tracks your activity, if you active in browser (mouse
104-
or keyboard).
105-
In order for the extension to also track when you watch a video on Netflix.com, you need grant
106-
permission to
107-
access the sites.
108-
It is necessary that extension will get access to DOM (Document Object Model).</label>
106+
<label class="block">Netflix</label>
109107
<input class="margin-top-10" type="button" value="Grant permission" id='grantPermissionForNetflix'>
110108
<div class="inline-block">
111109
<div id='permissionSuccessedBlockForNetflix' hidden>

src/scripts/background.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,8 @@ function executeScriptYoutube(callback, activeUrl, tab, activeTab) {
178178
function executeScriptNetflix(callback, activeUrl, tab, activeTab) {
179179
chrome.tabs.executeScript({ code: "var videoElement = document.getElementsByTagName('video')[0]; (videoElement !== undefined && videoElement.currentTime > 0 && !videoElement.paused && !videoElement.ended && videoElement.readyState > 2);" }, (results) => {
180180
if (results !== undefined && results[0] !== undefined && results[0] === true) {
181-
console.log("netglix is playing")
182181
callback(activeUrl, tab, activeTab);
183182
} else {
184-
console.log("netflix paused")
185183
activity.closeIntervalForCurrentTab();
186184
}
187185
});

0 commit comments

Comments
 (0)