source:
trunk/plugins/TakeATour/js/custom.patch
@
28775
Last change on this file since 28775 was 28775, checked in by , 10 years ago | |
---|---|
File size: 2.1 KB |
-
E:/Program
849 849 return step.path; 850 850 } 851 851 }).call(_this); 852 current_path = [document.location.pathname, document.location.hash].join("");852 current_path = document.location.href; 853 853 if (_this._isRedirect(path, current_path)) { 854 if (toString.call(path) === "[object RegExp]") { 854 855 _this._redirect(step, path); 856 } 857 else { 858 path = document.location.protocol+'//'+path; 859 _this._redirect(step, path); 860 } 855 861 return; 856 862 } 857 863 if (_this._isOrphan(step)) { … … 866 872 } 867 873 _this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true."); 868 874 } 875 if (step.title === "" & step.content === "") { 876 if (skipToPrevious) { 877 _this._showPrevStep(); 878 } else { 879 _this._showNextStep(); 880 } 881 return; 882 } 869 883 if (step.backdrop) { 870 884 _this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0); 871 885 } … … 988 1002 }; 989 1003 990 1004 Tour.prototype._isRedirect = function(path, currentPath) { 991 return (path != null) && path !== "" && (( {}.toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || ({}.toString.call(path) === "[object String]" && path.replace(/\?.*$/, "").replace(/\/?$/, "") !== currentPath.replace(/\/?$/, "")));1005 return (path != null) && path !== "" && ((toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || (toString.call(path) === "[object String]" && path !== currentPath.replace("http://", "").replace("https://", ""))); 992 1006 }; 993 1007 994 1008 Tour.prototype._redirect = function(step, path) {
Note: See TracBrowser
for help on using the repository browser.