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

Background URI matching on initalisation #22

Open
fatdunky opened this issue Feb 24, 2021 · 2 comments
Open

Background URI matching on initalisation #22

fatdunky opened this issue Feb 24, 2021 · 2 comments

Comments

@fatdunky
Copy link

fatdunky commented Feb 24, 2021

Hi,

I have been trying to get session-alive working with outlook webmail.

What i have found is, the rules work when using "Add a Rule for the page". But then when opening a new tab or reopening the browser etc the rule is not applied.

The issue appears to be that outlook adds alot onto the end of its URL etc.

So in background.js when you match the URI (line 234), you do an exact match:

if (bg_triggerUriVal !== "" && bg_triggerUriVal.replace(/\/$/, '').toLowerCase() == uri) {

From debugging i can see the following values:

bg_triggerUriVal: "https://outlook.office.com/"
uri: "https://outlook.office.com/mail/inbox/id/aaqkagm2ytq1lti3mjet

Are we able to update the match to an indexOf? (the same as foreground matches?) or add an option into setting to enable indexOf matching?

if (fg_loopUriVal !== "" && uri.length >= fg_loopUriVal.length && uri.indexOf(fg_loopUriVal) === 0) {

@Lanchon
Copy link

Lanchon commented Jul 10, 2021

see #18.

also, URL matching should always be case sensitive.

@arunelias
Copy link
Owner

Hi @fatdunky
Thank you for your feedback
I have committed the Trigger URL with wildcards feature with version 2.2
You can use Trigger URL (Background rule) as https://outlook.office.com/*
Please test and provide feedback
I will test this and publish to Firefox within some days
To install as developer extension please follow the steps: https://github.com/arunelias/session-alive#installation

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

No branches or pull requests

3 participants