-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(security): soft navigation to not rely on
jquery.history
(#671)
Fixes https://github.com/openwhyd/openwhyd/security/code-scanning/15 and https://github.com/openwhyd/openwhyd/security/code-scanning/14 Contributes to #669. ## Challenge To implement Openwhyd's soft/ajax-based navigation logic (that does not interrupt the music playback when navigating), `jquery.history` has been used indirectly by a jQuery-based abstraction layer of [`window.history`](https://developer.mozilla.org/en-US/docs/Web/API/Window/history): [jQuery History](https://github.com/yeikos/jquery.history). ([source code](https://github.com/yeikos/jquery.history/blob/master/jquery.history.js)) => This PR rewrites that logic, using the browser's History API directly. ## Changes * fix(security): fix: remove `jquery.history` * update snapshots for approval tests * `noDefaultJs` is never set => simplify list of included js files * fix(makefile): add `test-e2e-dev` to open Cypress runner * make e2e tests pass * clean-up logs * use `window.history` explicitly instead of `History` * call `pushState()` just from `goToPage()` * fix: `rootUrl` to make it work from any domain * remove default value for parameter `url` * fix(sonar): use substring instead of substr (deprecated) * fix(sonar): remove commented code
- Loading branch information
1 parent
61babb7
commit 23afd39
Showing
8 changed files
with
68 additions
and
140 deletions.
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.