source: trunk/plugins/TakeATour/js/custom.patch @ 28775

Last change on this file since 28775 was 28775, checked in by flop25, 10 years ago

adjustments for 2.7
js updated to 9.0.3

File size: 2.1 KB
  • E:/Program

     
    849849                return step.path;
    850850            }
    851851          }).call(_this);
    852           current_path = [document.location.pathname, document.location.hash].join("");
     852        current_path = document.location.href;
    853853          if (_this._isRedirect(path, current_path)) {
     854          if (toString.call(path) === "[object RegExp]") {
    854855            _this._redirect(step, path);
     856          }
     857          else {
     858            path = document.location.protocol+'//'+path;
     859            _this._redirect(step, path);
     860          }
    855861            return;
    856862          }
    857863          if (_this._isOrphan(step)) {
     
    866872            }
    867873            _this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true.");
    868874          }
     875        if (step.title  === "" & step.content  === "") {
     876            if (skipToPrevious) {
     877              _this._showPrevStep();
     878            } else {
     879              _this._showNextStep();
     880            }
     881            return;
     882        }
    869883          if (step.backdrop) {
    870884            _this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0);
    871885          }
     
    9881002    };
    9891003
    9901004    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://", "")));
    9921006    };
    9931007
    9941008    Tour.prototype._redirect = function(step, path) {
Note: See TracBrowser for help on using the repository browser.