You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This file contains hidden or 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
chrome packaged apps are not allowed to use inline script elements and functionally there doesn't seem to be any reason to keep these as inline in index.html
@tomByrer The problem though is that inline script elements are not permitted for chrome packaged apps (or extensions): https://developer.chrome.com/apps/app_csp.html
hence my pull request as this is one thing that can't be placed behind runtime checks the way global.inBrowser does for example. Also when I raised this on the mailinglist, @jasonsanjose seemed ok with making this change.
I've also made some fixes that should fix the CI build failures due to JSLint errors as well as adding the std adobe license header (as copied from brackets.js).
Ah, I see ty.
If that is the case, then wouldn't it be wise to put in the reasoning & the link you posted for me, so future editors don't repeat the same mistake?
<!-- All scripts must be external: https://developer.chrome.com/apps/app_csp.html -->
@maks I think you just need to fix the jsHint error and this can be merged in to master. You just need to move the || up to the previous line before the break. I know this is legacy but now that it's in a a js file it is getting scanned by Travis for jsHint failures. I would fix it but I don't want to commit to your private fork and I probably don't have permission to commit directly to it as-is.
@TomMalbran@JeffryBooher thanks both for the review. Having trailing operators is my preferred style as well and my local jshint was complaining about it to me as well - so happily fixed.
@JeffryBooher no probs, happy to fix it, but I'm not seeing anymore JShint errors here on my local machine, could you let me know what errors you are getting?
@maks, I found these by turning on JSLint in Brackets and opening the newly created JS files:
in xorigin.js:
32 'navigator' was used before it was defined. if (navigator.userAgent.search(" Chrome/") !== -1) {
45 Unexpected '(space)'. if (typeof (brackets) !== "undefined" ||
46 'document' was used before it was defined. document.location.href.substr(0, 7) !== "file://" ||
52 'window' was used before it was defined. var previousErrorHandler = window.onerror;
In dependencies.js
31 The body of a for in should be wrapp... for (key in deps) {
40 'document' was used before it was defined. document.write("<h1>Missing libraries</h1>");
43 The body of a for in should be wrapped... for (key in deps) {
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
4 participants
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.
chrome packaged apps are not allowed to use inline script elements and functionally there doesn't seem to be any reason to keep these as inline in index.html