-
Notifications
You must be signed in to change notification settings - Fork 16
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
OSOE-476: Extract inline javascript block into file, and register for usage in Lombiq.HelpfulExtensions #114
Conversation
….Extensions, setting the path of the .js file
Lombiq.HelpfulExtensions/Extensions/TargetBlank/Filters/TargetBlankFilter.cs
Outdated
Show resolved
Hide resolved
@TheHydes You can also commit the |
Since its optional, i would rather leave it out at this point. |
Well for the project to run on GH it's not needed, but in the long run it will be annoying for the developers, since it will be generated every time: And also as I linked it's commited in other submodules too. |
(links[i].hostname !== currentHostname && | ||
(!links[i].href.match(/^javascript:/i)))) { |
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.
This has been merged now, but there are superfluous parentheses here:
(links[i].hostname !== currentHostname && | |
(!links[i].href.match(/^javascript:/i)))) { | |
links[i].hostname !== currentHostname && | |
!links[i].href.match(/^javascript:/i)) { |
window.addEventListener( | ||
'load', | ||
() => { | ||
window.setTimeout(targetBlank, 100); |
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.
Why is the timeout necessary?
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.
Oh, I see it was in the original source.
The whole setTimeout
call shouldn't be necessary, though.
"nodejsExtensions": { | ||
"scripts": { | ||
"source": "Assets/Scripts", | ||
"target": "wwwroot/scripts" | ||
} | ||
}, |
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.
This whole configuration is superfluous, if you're willing to accept the default path wwwroot/js for JS files.
"devDependencies": { | ||
"eslint": "^8.25.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-only-warn": "^1.0.3", | ||
"eslint-plugin-promise": "^6.1.0" | ||
} |
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.
When used as part of OSOCE, this whole block should not be here.
I've created #116 to address the above and some more. |
OSOE-476