-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial functionality works (still prototype)
- Loading branch information
1 parent
c4bff9d
commit cb42f11
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
const MAGIC_URL_POSTFIX = '&list=ULcxqQ59vzyTk' | ||
|
||
chrome.browserAction.onClicked.addListener((tab)=>{ | ||
//chrome.tabs.executeScript(null, {file: "testScript.js"}) | ||
chrome.tabs.query({'active': true, 'lastFocusedWindow': true}, (tabs)=>{ | ||
let currentTab = tabs[0] | ||
let oldURL = currentTab.url | ||
console.log('url=', oldURL) | ||
|
||
|
||
let newUrl = oldURL + MAGIC_URL_POSTFIX | ||
chrome.tabs.update(currentTab.id, {url: newUrl}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"manifest_version": 2, | ||
|
||
"name": "YouTube Chronological Order", | ||
"description": "Watch YouTube videos in chronological order from any channel", | ||
"version": "0.1.0", | ||
"version_name": "0.1.0", | ||
|
||
"browser_action": { | ||
// "default_icon": "assets/icons/icon.png", | ||
"default_title": "Watch videos in chronological order" | ||
}, | ||
"permissions": [ | ||
"activeTab", | ||
"tabs" | ||
], | ||
"background": { | ||
"scripts": [ | ||
"background.js" | ||
] | ||
}, | ||
"commands": { | ||
"appendToUrl": { | ||
"suggested_key": { | ||
"default": "Alt+P" | ||
}, | ||
"description": "Watch all videos from channel in chronological order" | ||
} | ||
} | ||
} |