mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed week pulse view on start page
This commit is contained in:
parent
d07ca92252
commit
88cbce33e2
@ -2,10 +2,18 @@
|
|||||||
|
|
||||||
chrome.tabs.onUpdated.addListener(onTabUpdated);
|
chrome.tabs.onUpdated.addListener(onTabUpdated);
|
||||||
chrome.tabs.onRemoved.addListener(onTabRemoved);
|
chrome.tabs.onRemoved.addListener(onTabRemoved);
|
||||||
chrome.tabs.onActivated.addListener(onTabChanged);
|
|
||||||
chrome.runtime.onMessage.addListener(onPlaybackUpdate);
|
chrome.runtime.onMessage.addListener(onPlaybackUpdate);
|
||||||
|
|
||||||
|
|
||||||
|
var patterns = [
|
||||||
|
"https://music.youtube.com",
|
||||||
|
"http://music.youtube.com"
|
||||||
|
];
|
||||||
|
|
||||||
function onTabUpdated(tabId, changeInfo, tab) {
|
function onTabUpdated(tabId, changeInfo, tab) {
|
||||||
|
if (changeInfo.status !== "complete") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
console.log("Update")
|
console.log("Update")
|
||||||
chrome.tabs.get(tabId,party)
|
chrome.tabs.get(tabId,party)
|
||||||
}
|
}
|
||||||
@ -14,17 +22,10 @@ function onTabRemoved() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTabChanged(activeInfo) {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function party(tab) {
|
function party(tab) {
|
||||||
|
|
||||||
var patterns = [
|
|
||||||
"https://music.youtube.com",
|
|
||||||
"http://music.youtube.com"
|
|
||||||
];
|
|
||||||
|
|
||||||
importantPage = false
|
importantPage = false
|
||||||
|
|
||||||
for (var i=0;i<patterns.length;i++) {
|
for (var i=0;i<patterns.length;i++) {
|
||||||
|
@ -66,7 +66,7 @@ def instructions(keys):
|
|||||||
# pulse
|
# pulse
|
||||||
dt = datetime.utcnow()
|
dt = datetime.utcnow()
|
||||||
first_month = [dt.year-1,dt.month+1]
|
first_month = [dt.year-1,dt.month+1]
|
||||||
dt_firstweek = dt - timedelta(11*7) - timedelta((6-dt.weekday()))
|
dt_firstweek = dt - timedelta(11*7) - timedelta((tod.weekday() + 1) % 7)
|
||||||
first_week = [dt_firstweek.year,dt_firstweek.month,dt_firstweek.day]
|
first_week = [dt_firstweek.year,dt_firstweek.month,dt_firstweek.day]
|
||||||
dt_firstday = dt - timedelta(6)
|
dt_firstday = dt - timedelta(6)
|
||||||
first_day = [dt_firstday.year,dt_firstday.month,dt_firstday.day]
|
first_day = [dt_firstday.year,dt_firstday.month,dt_firstday.day]
|
||||||
@ -102,4 +102,3 @@ def instructions(keys):
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (replace,pushresources)
|
return (replace,pushresources)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user