1
0
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:
Krateng 2019-03-18 20:30:28 +01:00
parent d07ca92252
commit 88cbce33e2
2 changed files with 52 additions and 52 deletions

View File

@ -2,10 +2,18 @@
chrome.tabs.onUpdated.addListener(onTabUpdated);
chrome.tabs.onRemoved.addListener(onTabRemoved);
chrome.tabs.onActivated.addListener(onTabChanged);
chrome.runtime.onMessage.addListener(onPlaybackUpdate);
var patterns = [
"https://music.youtube.com",
"http://music.youtube.com"
];
function onTabUpdated(tabId, changeInfo, tab) {
if (changeInfo.status !== "complete") {
return;
}
console.log("Update")
chrome.tabs.get(tabId,party)
}
@ -14,17 +22,10 @@ function onTabRemoved() {
}
function onTabChanged(activeInfo) {
}
function party(tab) {
var patterns = [
"https://music.youtube.com",
"http://music.youtube.com"
];
importantPage = false
for (var i=0;i<patterns.length;i++) {

View File

@ -66,7 +66,7 @@ def instructions(keys):
# pulse
dt = datetime.utcnow()
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]
dt_firstday = dt - timedelta(6)
first_day = [dt_firstday.year,dt_firstday.month,dt_firstday.day]
@ -102,4 +102,3 @@ def instructions(keys):
}
return (replace,pushresources)