destinytracker to light.gg

make destinytracker to light.gg /n dim默认perk查询网站跳到light.gg

当前为 2021-08-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name destinytracker to light.gg
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description make destinytracker to light.gg /n dim默认perk查询网站跳到light.gg
  6. // @author zxhyc131
  7. // @match https://destinytracker.com/destiny-2/db/items/*
  8. // @icon https://www.google.com/s2/favicons?domain=destinytracker.com
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. var reg= /https:\/\/destinytracker.com\/destiny-2\/db\/items\/(.*)\?.*/
  15. var url=location.href
  16. var id =url.match(reg)[1]
  17. if(id){
  18. var lightUrl='https://www.light.gg/db/zh-cht/items/'+id
  19. console.log(lightUrl,'lightUrl')
  20. location.href=lightUrl
  21. }
  22. })();