Skip to content
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

Add DownloadPost event to autocmds #4660

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bovine3dom
Copy link
Member

@bovine3dom bovine3dom commented Apr 8, 2023

Supercedes #1495

Edit: fixes #807

#1495 was going to look at #810 but I have removed those bits for now to try to get this merged within the next four years

@@ -2361,7 +2361,7 @@ if (fullscreenApiIsPrefixed) {

/** @hidden */
//#content
export async function loadaucmds(cmdType: "DocStart" | "DocLoad" | "DocEnd" | "TabEnter" | "TabLeft" | "FullscreenEnter" | "FullscreenLeft" | "FullscreenChange" | "UriChange" | "HistoryState") {
export async function loadaucmds(cmdType: "DocStart" | "DocLoad" | "DocEnd" | "TabEnter" | "TabLeft" | "FullscreenEnter" | "FullscreenLeft" | "FullscreenChange" | "UriChange" | "HistoryState" | "DownloadPost") {
const aucmds = await config.getAsync("autocmds", cmdType)
if (!aucmds) return
const ausites = Object.keys(aucmds)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @antonva just casually looking at your 4 year-old PR

Your DownloadPost events are triggered based on the page currently being viewed

const aukeyarr = ausites.filter(e => window.document.location.href.search(e) >= 0)

Was that intentional? It seems a little weird to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DownloadPost autocommand
2 participants