-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…16407) Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
- Loading branch information
1 parent
2b0add1
commit 3e3b9df
Showing
5 changed files
with
18 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,23 @@ | ||
<html> | ||
<head> | ||
<title>Bb Router</title> | ||
<script src="/node_modules/jquery/dist/jquery.js"></script> | ||
<script src="/node_modules/underscore/underscore.js"></script> | ||
<script src="/node_modules/backbone/backbone.js"></script> | ||
</head> | ||
<body> | ||
<a href="#one">one</a> <a href="#two">two</a> <a href="#three">three</a> | ||
<a href="#one">one</a> | ||
<a href="#two">two</a> | ||
<a href="#three">three</a> | ||
<div id="visited"></div> | ||
<script> | ||
var Workspace = Backbone.Router.extend({ | ||
const visitedLink = document.getElementById('visited') | ||
|
||
routes: { | ||
"one": "one", | ||
"two": "two", | ||
"three": "three" | ||
}, | ||
|
||
one: function() { | ||
$('#visited').append('<div>one</div>'); | ||
}, | ||
|
||
two: function() { | ||
$('#visited').append('<div>two</div>'); | ||
}, | ||
|
||
three: function() { | ||
$('#visited').append('<div>three</div>'); | ||
window.addEventListener("hashchange", function () { | ||
if (location.hash === '#one') { | ||
visitedLink.append('one'); | ||
} | ||
}); | ||
|
||
new Workspace(); | ||
|
||
Backbone.history.start(); | ||
|
||
if (location.hash === '#two') { | ||
visitedLink.append('two'); | ||
} | ||
if (location.hash === '#three') { | ||
visitedLink.append('three'); | ||
} | ||
}) | ||
</script> | ||
</body> | ||
</html> |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10915,13 +10915,6 @@ bach@^1.0.0: | |
async-settle "^1.0.0" | ||
now-and-later "^2.0.0" | ||
|
||
[email protected]: | ||
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/backbone/-/backbone-1.4.0.tgz#54db4de9df7c3811c3f032f34749a4cd27f3bd12" | ||
integrity sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ== | ||
dependencies: | ||
underscore ">=1.8.3" | ||
|
||
[email protected], backo2@~1.0.2: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" | ||
|
@@ -35713,10 +35706,10 @@ [email protected]: | |
sprintf-js "^1.0.3" | ||
util-deprecate "^1.0.2" | ||
|
||
underscore@1.9.1, underscore@>=1.8.3, underscore@^1.8.3: | ||
version "1.9.1" | ||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" | ||
integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== | ||
underscore@^1.8.3: | ||
version "1.12.1" | ||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" | ||
integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== | ||
|
||
underscore@~1.6.0: | ||
version "1.6.0" | ||
|
3e3b9df
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.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
3e3b9df
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.
AppVeyor has built the
win32 ia32
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
3e3b9df
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.
AppVeyor has built the
win32 x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
3e3b9df
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.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: