FFXIV Craft Quest tools
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
974B

  1. // ==UserScript==
  2. // @name Garland location fixer
  3. // @version 1
  4. // @include http://www.garlandtools.org/db/*
  5. // @run-at document-end
  6. // @grant none
  7. // ==/UserScript==
  8. /* Patch gathering material resolver */
  9. function garlandLocationFixer() {
  10. 'use strict';
  11. console.log('fixer: garlandLocationFixer, v1.0');
  12. console.log('fixer: installing monkey patch');
  13. let actual_resolve = gt.node.resolveCraftSource;
  14. gt.node.resolveCraftSource = function(step, id) {
  15. actual_resolve(step, id);
  16. let view = step.sourceView;
  17. console.log('fixer: Adding ' + view.name + ' to ' + view.longSourceName);
  18. view.longSourceName = view.name + ', ' + view.longSourceName;
  19. console.log('fixer: done.');
  20. }
  21. console.log('fixer: done.');
  22. }
  23. /* Add script to execute in page scope */
  24. var script = document.createElement("script");
  25. script.type = "application/javascript";
  26. script.textContent = "(" + garlandLocationFixer + ")();";
  27. document.body.appendChild(script);