mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Added link redirect to docs
This commit is contained in:
@@ -10,6 +10,7 @@ code-prettify@1.0.0
|
||||
coffeescript@1.0.2
|
||||
ctl-helper@1.0.2
|
||||
ctl@1.0.0
|
||||
deps@1.0.1
|
||||
ejson@1.0.0
|
||||
follower-livedata@1.0.0
|
||||
geojson-utils@1.0.0
|
||||
@@ -41,7 +42,6 @@ spacebars@1.0.0
|
||||
spiderable@1.0.2
|
||||
standard-app-packages@1.0.0
|
||||
templating@1.0.4
|
||||
tracker@1.0.1
|
||||
ui@1.0.0
|
||||
underscore@1.0.0
|
||||
webapp@1.0.2
|
||||
|
||||
17
docs/client/link-redirect.js
Normal file
17
docs/client/link-redirect.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// make links backwards compatible - for example, #deps -> #tracker
|
||||
|
||||
var getRedirect = function (hash) {
|
||||
if (hash.indexOf("deps") !== -1) {
|
||||
return hash.replace("deps", "tracker");
|
||||
}
|
||||
|
||||
// don't redirect
|
||||
return false;
|
||||
};
|
||||
|
||||
var curLink = window.location.hash.slice(1);
|
||||
var redirect = getRedirect(curLink);
|
||||
|
||||
if (redirect) {
|
||||
window.location = "#" + redirect;
|
||||
}
|
||||
Reference in New Issue
Block a user