-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DEPRECATED] Local Subscriptions Plugin #340
Closed
Closed
Changes from all commits
Commits
Show all changes
730 commits
Select commit
Hold shift + click to select a range
87a8fee
fix in-app-menu navbar opacity + scrollbar color
Araxeus 2722ee2
Minimalize tray menu
Araxeus 1a7ef11
remove redundant roles
Araxeus dae8ef0
additional cleanup/refactoring
semvis123 fd3b09e
Merge branch 'master' into lastfm
semvis123 8e46aaa
move advanced options to dedicated submenu +
Araxeus 8e41e8e
fix bug when loading window with no connection
Araxeus 416c28d
add 'electron-prompt' and use it for setting proxy
Araxeus c9773d9
fix memory leak +
Araxeus 5cd3f5a
refactor and stylecheck
Araxeus f6739b1
fix in-app-menu hideMenu on launch
Araxeus a6b64cb
fix Connection Error when using in-app-menu
Araxeus 73b7a39
Revert "fix Connection Error when using in-app-menu"
Araxeus 3e29f1a
disable dev tools on electron-prompt
Araxeus 1be3607
ignore proxy if equal to example
Araxeus 22a504a
custom dark skin for prompt
Araxeus c7d7d03
implement custom prompt
Araxeus 53cb739
css tweaks
Araxeus 95ac788
stylecheck
Araxeus f6542d8
add back-to-front logger
Araxeus a88d213
stylecheck
Araxeus 835a872
fix hide-menu timing + minify log function
Araxeus 96a3f76
fix typo
Araxeus e40aef8
move prompt to provide
Araxeus 7c9a656
Create readme.md
Araxeus 73ad9b0
refactor and css fix
Araxeus a70e076
xo --fix
Araxeus 470e707
add inline doc
Araxeus 7ef5eb1
fix typo
Araxeus 6b160f8
Create readme.md
Araxeus da9bcd4
Merge branch 'menu-fixes' of https://github.com/Araxeus/youtube-music…
Araxeus 5f74452
add windows interactive notifications
Araxeus d376d62
remove appID because of bug:
Araxeus 355ad16
stylecheck
Araxeus 64fc00e
minify
Araxeus 4272ff5
fix rare crash due to unfocus effect
Araxeus ae6ee3c
add note to notifications.interactive
Araxeus 4643427
fix unPause option compatibility
Araxeus d476f03
clarify button purpose
Araxeus 94c19b0
Center Icon on ALL notifications
Araxeus caa8b6c
change notification priority to show only on linux
Araxeus 13c8c55
Revert "fix rare crash due to unfocus effect"
Araxeus ab5f3a8
add unresponsive listener
Araxeus dd49512
remove downloads-folder and use electron instead
Araxeus a3f3b02
update dependecies
Araxeus e01238f
taskbar-mediacontrol no longer override win.hide
Araxeus cc539d6
Update ytpl
Araxeus b3e3706
cleanup unresponsiveDialog
Araxeus 4c08f26
remove " - Topic" from artist name
Araxeus 300bc6a
navbar background black fix visual bug
Araxeus e02e345
fix unresponsive dialog response
Araxeus a964bcf
scrape artistName from playBar
Araxeus 6216f38
fix: upgrade @cliqz/adblocker-electron from 1.20.3 to 1.20.4
snyk-bot 11962ce
add precise scrollwheel control + precise tooltip
Araxeus 0719e5e
update inline doc
Araxeus 96aaf6a
xo --fix
Araxeus ff0fde6
refactor
Araxeus 70cb69e
save volume to settings
Araxeus e9f59f9
fix set volume on first run after not using plugin
Araxeus 2d59744
add optional arrowkeys controls option
Araxeus 65eae2b
enable changing shortcut setting without restart
Araxeus e0ebab1
fix changing settings when plugin is disabled
Araxeus 5e321e9
xo --fix
Araxeus 44f7a41
add advanced option to change volume steps
Araxeus 28a3aa0
add prompt with number counter
Araxeus 46f2594
lint
Araxeus 7aaff6c
xo --fix
Araxeus 9056e91
add rapidFire option to counter prompt
Araxeus 5f593be
use timeout ID to stop callback
Araxeus ddeabb3
lint
Araxeus 8ecec8e
refactor + lint
Araxeus 7f838f8
add option for plugin to have a preload.js
Araxeus fa97953
disable native volume-slider listeners
Araxeus 199af16
Show volume slider on volume change
Araxeus eb43514
lint
Araxeus 0dec12a
remove slider on-hover after 3 seconds if !focused
Araxeus f5434d5
simple fix
Araxeus 5f286aa
revert to original lint format
Araxeus 79cb444
`once` instead of `on`
Araxeus 4b79a21
`win.once()` instead of `win.on`
Araxeus 1bd27d5
Update readme.md
Araxeus 03e1840
Add Video Player Mousewheel Volume Control
Araxeus 392bc64
addEventListener insead of .onwheel
Araxeus d901a4b
enable global volume shortcuts in advanced config
Araxeus 6cda4ca
update inline doc
Araxeus dda0d7d
Merge pull request #239 from Araxeus/discord-fix
th-ch 0d2429a
implement keybind prompt
Araxeus 2610044
defensive code
Araxeus 5c6f309
switch function name to camelCase
Araxeus 38f496d
remove local prompt
Araxeus b585c1a
leave debug for next PR
Araxeus 3eb492b
fix typo
Araxeus fbca6d6
remove proxy from menu
Araxeus 9d22df3
update camelCase
Araxeus f7b6fd7
make variable names clearer
Araxeus 6810679
fix typo
Araxeus ccd390b
fix typo
Araxeus 9f6bee5
small refactor
Araxeus d185537
Merge pull request #196 from semvis123/lastfm
th-ch 4bdf7e1
Update yarn.lock
th-ch 3e494a9
fix: upgrade electron-store from 7.0.2 to 7.0.3
snyk-bot 19edb54
Fix download URL
th-ch 8f89fe7
Set max file length to 255 in downloader
th-ch 883e61f
Set metadata in back (to have cover)
th-ch bd0ba3d
Merge pull request #245 from th-ch/fix-downloader-metadata
th-ch 4a443cd
Merge branch 'master' into dependencies-update
th-ch 73bc6a4
Merge pull request #231 from Araxeus/dependencies-update
th-ch fbcb558
Fix getFolder util (main/renderer process)
th-ch 76e09a7
Merge pull request #233 from th-ch/snyk-upgrade-db0717b422c1c3d1fcb50…
th-ch b0536d4
Merge pull request #244 from th-ch/snyk-upgrade-99aee86a0f7b96c0f871b…
th-ch 914c909
Merge pull request #236 from Araxeus/precise-volume
th-ch a476274
Merge branch 'master' into interactive-notifications
th-ch e46032c
remove redundant dialog import
Araxeus 3bde726
minify switch case
Araxeus 46fcb29
fix typo
Araxeus fa28737
Merge branch 'menu-fixes' of https://github.com/Araxeus/youtube-music…
Araxeus bf8ef75
Merge pull request #228 from Araxeus/interactive-notifications
th-ch 1d91187
Fix package.json indent, update yarn.lock
th-ch 452062a
resolve merge conflict
Araxeus 515cfb9
Update electron to 11.4.4
th-ch ab1a1e6
Bump version to 1.12.0
th-ch 3f530de
stringify did-fail-load error
Araxeus d3584f5
ignore did-fail-load error code `-3`
Araxeus 44d4dcd
Merge pull request #224 from Araxeus/menu-fixes
th-ch dc4b54d
Remove preload.js in plugin uses and use front plugin injection
th-ch d0c2444
Import front logger at top level
th-ch b0242aa
Revert "Remove preload.js in plugin uses and use front plugin injection"
th-ch c59e044
fix metadata when downloading unplayed song
Araxeus c7bd71b
use media propery if exist in song-info
Araxeus f3943ab
lint
Araxeus ea6533d
allow unlimited playlist size
Araxeus 7d29e4b
fix error thrown when downloading playlist
Araxeus 7dd4344
custom metadata on playlist-download
Araxeus 347ba76
started playlist downlaod messageBox
Araxeus 9339a41
playlist download progressBar using `chokidar`
Araxeus bfe6377
lint
Araxeus 2964cea
fix listener override condition
Araxeus 7e551d9
fix `preventDefault()` being called on *all* keys
Araxeus 7dc924e
refactor addEventListener
Araxeus 994d983
lint
Araxeus 64e5210
fix css not inserting on reload
Araxeus 96d0383
directly playPause video element
Araxeus 0a92d26
lint
Araxeus 3ee04fc
minify
Araxeus 324898c
Merge pull request #255 from Araxeus/fix-css-on-reload
th-ch ff2cdc8
Bump ua-parser-js from 0.7.23 to 0.7.28
dependabot[bot] adefc7f
Merge pull request #253 from Araxeus/fix-precise-volume-listener-over…
th-ch bb8cd1b
Merge pull request #260 from th-ch/dependabot/npm_and_yarn/ua-parser-…
th-ch b76b907
Bump version to 1.12.1
th-ch 2530344
check if `yns_pause` exists
Araxeus bdb8b4e
create `cleanupArtistName()` in song-info
Araxeus 39fd299
lint
Araxeus e573dee
Merge pull request #259 from Araxeus/force-pause
th-ch b4175d6
Add `start:debug` command to enable dev with electron debug
th-ch 4acf643
lint
Araxeus 6208a02
Merge pull request #252 from Araxeus/fix-download-idtag-if-not-playing
th-ch d172d9d
remove `open` dependency
Araxeus 2bda7c2
lint
Araxeus 664dd03
debug videoUrl from `start Radio` button in menu
Araxeus effd70d
use image from imageSrc if transfered
Araxeus a45700a
download progress bar on taskbar
Araxeus 90db937
refactor
Araxeus 19f7221
use original metadata only if not already captured from ytpl.getInfo()
Araxeus ec8bf7b
small refactor
Araxeus 1628918
fix sendError()
Araxeus c219d71
differentiate names of different metadata sources
Araxeus aa58ac1
minimize getArtist()
Araxeus cb401e7
remove videoDetails?.media query from XHR
Araxeus dab1628
lint
Araxeus 8fe1522
Merge pull request #262 from Araxeus/remove-`open`-dependency
th-ch 9e63d92
lint
Araxeus f2f99d1
update radioButton querySelector
Araxeus 793bf6d
querySelector optimization #2
Araxeus 795456c
Merge pull request #265 from Araxeus/ensure-download-from-radio-button
th-ch 28c8e74
Downloader: catch error when fetching playlist
th-ch c209e2d
Downloader: rename UrlToJPG to urlToJPG
th-ch a68f0b6
fix config overwrite on each start
Araxeus f26b96d
Merge pull request #267 from Araxeus/last-fm-config-check-fix
th-ch 26e45c4
setup SongInfo **once**
Araxeus d7d6353
refactor notifications plugin
Araxeus b129957
lint
Araxeus 74aa6ff
set appID on windows
Araxeus c62ec8d
writeShortcut on windows
Araxeus eb59056
create shortcut only if needed
Araxeus 76aa129
lint
Araxeus fd211cf
check that app is installed / unpacked
Araxeus 9231543
register appID on windows reguardless of shortcut
Araxeus 4ccc776
lint
Araxeus 45745b5
Upgrade electron to v12
th-ch d97491e
Merge pull request #273 from th-ch/upgrade-electron
th-ch 7a04172
Merge pull request #270 from Araxeus/fix-normal-notification-showing-…
th-ch ff3efe1
fix: upgrade ytpl from 2.1.1 to 2.2.0
snyk-bot 5e287e0
switch to `registerCallback()` on song info
Araxeus 2c9959a
fix: upgrade filenamify from 4.2.0 to 4.3.0
snyk-bot 6356bce
fix notificationOnUnpause option
Araxeus deea422
fix: upgrade @ffmpeg/core from 0.8.5 to 0.9.0
snyk-bot 2629e6c
fix: upgrade ytdl-core from 4.5.0 to 4.7.0
snyk-bot 9f1498d
fix: upgrade @cliqz/adblocker-electron from 1.20.4 to 1.20.5
snyk-bot d8f1c68
Bump browserslist from 4.16.3 to 4.16.6
dependabot[bot] d05ca1d
Bump electron to 12.0.8
th-ch c758485
Merge pull request #269 from Araxeus/fix-XHR-duplicate-callback
th-ch 58d68a9
Merge pull request #285 from th-ch/snyk-upgrade-7b9c569f5bdd092f76adf…
th-ch 42e55ec
Merge pull request #293 from th-ch/snyk-upgrade-335ec370c7caa5a759c54…
th-ch 790d9fb
Merge pull request #298 from th-ch/snyk-upgrade-d305cdce94133f6db9615…
th-ch 24d25a0
Merge branch 'master' of github.com:th-ch/youtube-music into snyk-upg…
th-ch 75464c9
Merge pull request #299 from th-ch/snyk-upgrade-37e43892f5a34f935e848…
th-ch 5774e34
Merge branch 'master' of github.com:th-ch/youtube-music into snyk-upg…
th-ch b3b1545
Merge pull request #300 from th-ch/snyk-upgrade-ce2777733d9dee231391c…
th-ch 47d8f2d
Merge pull request #301 from th-ch/dependabot/npm_and_yarn/browsersli…
th-ch 03610ff
Bump ws from 7.4.3 to 7.4.6
dependabot[bot] b63b51d
Merge pull request #303 from th-ch/dependabot/npm_and_yarn/ws-7.4.6
th-ch ae70f00
fix: upgrade @ffmpeg/ffmpeg from 0.9.7 to 0.9.8
snyk-bot d4a1c07
Merge pull request #305 from th-ch/snyk-upgrade-15656c519a90f5bc0f5c8…
th-ch fcd8876
Set test environment per test file
th-ch 057b88e
Refactor videoElement getter into a provider with callback
th-ch 78f0d08
Add SponsorBlock plugin
th-ch 9a68e14
Update adblocking
th-ch 4e3ed42
Keep segments when skipping
th-ch b268f85
Merge pull request #308 from th-ch/sponsorblock-plugin
th-ch f6c7f07
fix: upgrade custom-electron-titlebar from 3.2.6 to 3.2.7
snyk-bot f99f52e
fix: upgrade @ffmpeg/ffmpeg from 0.9.8 to 0.10.0
snyk-bot a2198e1
fix: upgrade @ffmpeg/core from 0.9.0 to 0.10.0
snyk-bot 0c297d1
fix unsupported hidden webp coverart
Araxeus aeb315c
check if native image is empty before writing id tag
Araxeus ac3dada
Bump trim-newlines from 3.0.0 to 3.0.1
dependabot[bot] 1498027
Bump normalize-url from 4.5.0 to 4.5.1
dependabot[bot] 07532f7
fix: upgrade electron-updater from 4.3.8 to 4.3.9
snyk-bot d271368
fix: upgrade ytdl-core from 4.8.0 to 4.8.2
snyk-bot da3b1c5
Merge pull request #318 from Araxeus/fix-hidden-webp-cover-art
th-ch e2e42f5
Bump hosted-git-info from 2.8.8 to 2.8.9
dependabot[bot] 12afd3d
Merge pull request #311 from th-ch/snyk-upgrade-44a5db26689d4091f6a2c…
th-ch 791e1e0
Merge pull request #316 from th-ch/snyk-upgrade-6e93904bf885d198521c6…
th-ch c092c39
Merge branch 'master' of github.com:th-ch/youtube-music into snyk-upg…
th-ch daa3163
Merge pull request #317 from th-ch/snyk-upgrade-a785f5d95c7765e2d4773…
th-ch bacc856
Merge pull request #320 from th-ch/dependabot/npm_and_yarn/trim-newli…
th-ch 21b8ad1
Merge pull request #323 from th-ch/dependabot/npm_and_yarn/normalize-…
th-ch e3f879b
Merge pull request #324 from th-ch/snyk-upgrade-f650e2139b30a36951a4a…
th-ch ade06fd
Merge pull request #328 from th-ch/snyk-upgrade-dacfb8f0b574367961e40…
th-ch f570145
Bump lodash from 4.17.20 to 4.17.21
dependabot[bot] b1fae7a
Merge pull request #330 from th-ch/dependabot/npm_and_yarn/lodash-4.1…
th-ch 385bbfd
Merge pull request #331 from th-ch/dependabot/npm_and_yarn/hosted-git…
th-ch d901c0a
init plugin
fdr-smnv c375d60
Refactor html & css, prepare front for sub button
fdr-smnv b08a7fc
Fix plugin menu error
fdr-smnv 1bd2be2
Add working sub btn. Save subs in plugin options
fdr-smnv 803facd
Render subs in new win On clk follow link Refactor
fdr-smnv 9bd5489
Add comments
fdr-smnv d2b5074
Merge branch 'master' of github.com:fdr-smnv/youtube-music into local…
fdr-smnv b5dc5f4
Refactor
fdr-smnv 4f8c228
Add default options for plugin
fdr-smnv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,24 @@ | ||
const { triggerAction } = require("../utils"); | ||
|
||
const CHANNEL = 'local-subscriptions' | ||
const ACTIONS = { | ||
SUBS_WIN_BTN: 'subscriptions-window-button', | ||
SUBS_LI_CLK: 'subscriptions-list-item-click' | ||
} | ||
|
||
function openSubscriptionsWindow() { | ||
triggerAction(CHANNEL, ACTIONS.SUBS_WIN_BTN) | ||
} | ||
|
||
function handleListItemClick(pathname) { | ||
triggerAction(CHANNEL, ACTIONS.SUBS_LI_CLK, pathname) | ||
} | ||
|
||
module.exports = { | ||
CHANNEL, | ||
ACTIONS, | ||
actions: { | ||
openSubscriptionsWindow, | ||
handleListItemClick | ||
} | ||
}; |
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,57 @@ | ||
const { BrowserWindow, ipcMain } = require("electron"); | ||
const path = require("path"); | ||
const defaultConfig = require("../../config/defaults"); | ||
const { getOptions, setOptions } = require("../../config/plugins"); | ||
|
||
const { injectCSS, listenAction, templatePath } = require("../utils"); | ||
const { ACTIONS, CHANNEL } = require("./actions.js"); | ||
|
||
let subscriptionsWindow; | ||
|
||
module.exports = win => { | ||
// inject CSS in main window | ||
injectCSS(win.webContents, path.join(__dirname, "style.css"), () => { | ||
win.webContents.send("subscriptions-css-ready"); | ||
}); | ||
|
||
listenAction(CHANNEL, (event, action, data) => { | ||
switch(action) { | ||
// Open new window and send there local subscriptions from options | ||
case ACTIONS.SUBS_WIN_BTN: | ||
subscriptionsWindow = new BrowserWindow({ | ||
parent: win, | ||
webPreferences: { | ||
preload: path.join(__dirname, "popup.js"), | ||
affinity: "main-window" | ||
}}) | ||
subscriptionsWindow.loadFile(templatePath(__dirname, "subscriptions-menu.html")) | ||
subscriptionsWindow.webContents.on('did-stop-loading', () => subscriptionsWindow.webContents.send('saved-subscriptions', getOptions('local-subscriptions').subscriptions)) | ||
break; | ||
case ACTIONS.SUBS_LI_CLK: | ||
subscriptionsWindow.close(); | ||
console.log(action) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: only log that in dev mode ( |
||
win.loadURL(defaultConfig.url + data); | ||
break; | ||
default: | ||
console.log("Unknown action: " + action); | ||
} | ||
}) | ||
|
||
// Handles sub button click and saves changes in options | ||
ipcMain.on('sub-btn-clk', (event, pathname, channelName) => { | ||
const currentSubscriptions = getOptions('local-subscriptions'); | ||
const newSubscription = {[pathname]: {channelName, subDate: new Date()}} | ||
const didSubscribe = !!currentSubscriptions.subscriptions[pathname]; | ||
|
||
if (didSubscribe) { | ||
delete currentSubscriptions.subscriptions[pathname]; | ||
setOptions('local-subscriptions', {...currentSubscriptions}) | ||
} else { | ||
setOptions('local-subscriptions', {...currentSubscriptions, | ||
subscriptions: {...currentSubscriptions.subscriptions, ...newSubscription}}); | ||
} | ||
}) | ||
|
||
win.webContents.on('did-stop-loading', () => win.webContents.send('subscriptions-page-stop-loading')) | ||
win.webContents.on('did-navigate-in-page', () => win.webContents.send('subscriptions-location-change')); | ||
}; |
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,36 @@ | ||
const { ipcRenderer } = require("electron"); | ||
const { ElementFromFile, templatePath } = require("../utils"); | ||
|
||
// Send channel data to 'back' on 'sub-btn-clk' channel | ||
const localSubscriptionButtonHandler = () => { | ||
const channelName = document.querySelector('.title.style-scope.ytmusic-immersive-header-renderer').innerHTML | ||
ipcRenderer.send('sub-btn-clk', window.location.pathname, channelName); | ||
} | ||
|
||
module.exports = () => { | ||
// On css load add local subscriptions button to the menu | ||
ipcRenderer.on('subscriptions-css-ready', () => { | ||
const localSubscriptionsButton = ElementFromFile(templatePath(__dirname, "subscriptions-tab.html")); | ||
const menu = document.querySelector("ytmusic-pivot-bar-renderer"); | ||
|
||
if (menu) { | ||
menu.appendChild(localSubscriptionsButton); | ||
} | ||
}); | ||
|
||
// On page loading finnish check if it is a channel page | ||
// If it is add sub button to the page | ||
ipcRenderer.on('subscriptions-page-stop-loading', () => { | ||
const isChannelPage = window.location.pathname.includes('channel'); | ||
|
||
if (isChannelPage) { | ||
const buttons = document.querySelector(".buttons.style-scope.ytmusic-immersive-header-renderer"); | ||
if (buttons) { | ||
const localSubscriptionButton = document.createElement('button') | ||
localSubscriptionButton.innerText = 'Local Subscription' | ||
localSubscriptionButton.onclick = localSubscriptionButtonHandler; | ||
buttons.appendChild(localSubscriptionButton); | ||
} | ||
} | ||
}); | ||
}; |
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,31 @@ | ||
const { ipcRenderer, contextBridge } = require("electron"); | ||
const { ElementFromHtml } = require("../utils"); | ||
const {handleListItemClick} =require('./actions').actions; | ||
|
||
|
||
// Couldn't manage to attach actions to global object | ||
// Only contextBridge have worked | ||
|
||
// const actions = require('./actions.js').actions || {}; | ||
// Object.keys(actions).forEach((actionName) => { | ||
// console.log(actionName); | ||
// globalThis.API = {}; | ||
// globalThis.API[actionName] = actions[actionName]; | ||
// }) | ||
|
||
contextBridge.exposeInMainWorld('SUBS_WIN', { | ||
handleListItemClick | ||
}) | ||
|
||
// Load subscriptions in a list on window load | ||
ipcRenderer.on('saved-subscriptions', (evt, subs) => { | ||
const subList = document.getElementById('subscriptions-list'); | ||
|
||
if (subList) { | ||
Object.keys(subs).forEach(subKey => { | ||
const sub = subs[subKey]; | ||
const subEl = ElementFromHtml(`<li data-pathname="${subKey}" onclick="window.SUBS_WIN.handleListItemClick('${subKey}')">${sub.channelName} | ${sub.subDate}</a></li>`); | ||
subList.appendChild(subEl); | ||
}) | ||
} | ||
}) |
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,19 @@ | ||
.subscriptions-item { | ||
font-family: Roboto, Noto Naskh Arabic UI, Arial, sans-serif; | ||
font-size: 20px; | ||
line-height: var(--ytmusic-title-1_-_line-height); | ||
font-weight: 500; | ||
color: #fff; | ||
--yt-endpoint-color: #fff; | ||
--yt-endpoint-hover-color: #fff; | ||
--yt-endpoint-visited-color: #fff; | ||
display: inline-flex; | ||
align-items: center; | ||
color: rgba(255, 255, 255, 0.5); | ||
cursor: pointer; | ||
margin: 0 var(--ytmusic-pivot-bar-tab-margin); | ||
} | ||
|
||
.subscriptions-item:hover { | ||
color: #fff; | ||
} |
12 changes: 12 additions & 0 deletions
12
plugins/local-subscriptions/templates/subscriptions-menu.html
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,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Subscriptions</title> | ||
</head> | ||
<body> | ||
<ul id='subscriptions-list'></ul> | ||
</body> | ||
</html> |
16 changes: 16 additions & 0 deletions
16
plugins/local-subscriptions/templates/subscriptions-tab.html
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,16 @@ | ||
<div | ||
class="style-scope ytmusic-pivot-bar-renderer subscriptions-item" | ||
tab-id="FElocal_subscriptions" | ||
role="tab" | ||
onclick="openSubscriptionsWindow()" | ||
> | ||
<div | ||
class="search-icon style-scope ytmusic-search-box" | ||
role="button" | ||
tabindex="0" | ||
aria-disabled="false" | ||
title="Subscriptions" | ||
> | ||
<a class="tab-title style-scope ytmusic-pivot-bar-item-renderer">Subscriptions</a> | ||
</div> | ||
</div> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will require a store migration: when you enable it for the first time, your config will end up with:
And the code does not support empty
subscriptions
:)