Bootstrap Docs - Redirect to specified version of docs

Allow redirecting to specified version of docs. Change in script.

  1. // ==UserScript==
  2. // @name Bootstrap Docs - Redirect to specified version of docs
  3. // @namespace https://github.com/DakuTree/userscripts
  4. // @author Daku (admin@codeanimu.net)
  5. // @description Allow redirecting to specified version of docs. Change in script.
  6. // @homepageURL https://github.com/DakuTree/userscripts
  7. // @supportURL https://github.com/DakuTree/userscripts/issues
  8. // @include /^https?:\/\/getbootstrap\.com\/docs\/.*?\/.*?$/
  9. // @updated 2019-10-03
  10. // @version 1.0.0
  11. // @run-at document-start
  12. // ==/UserScript==
  13. /* jshint -W097, browser:true, devel:true */
  14. /* global $:false, jQuery:false */
  15. 'use strict';
  16.  
  17. const BOOTSTRAP_VERSION = '4.3'; // Change this wanted versions...
  18.  
  19. let urlArr = location.href.split('/');
  20.  
  21. if(urlArr[4] !== BOOTSTRAP_VERSION) {
  22. urlArr[4] = BOOTSTRAP_VERSION;
  23.  
  24. location.href = urlArr.join('/');
  25. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址