PostgreSQL Doc Title Shortener

Make the title of PostgreSQL Documentation shorter!

  1. // ==UserScript==
  2. // @name PostgreSQL Doc Title Shortener
  3. // @namespace https://xtexx.eu.org/
  4. // @version 0.1.1
  5. // @description Make the title of PostgreSQL Documentation shorter!
  6. // @author xtex
  7. // @match https://www.postgresql.org/docs/*
  8. // @icon https://www.postgresql.org/favicon.ico
  9. // @grant none
  10. // @run-at document-body
  11. // @noframes
  12. // @supportURL https://codeberg.org/xtex/gadgets/issues
  13. // @license Unlicense
  14. // ==/UserScript==
  15.  
  16. (function () {
  17. 'use strict';
  18.  
  19. if (document.title.startsWith('PostgreSQL: Documentation: ')) {
  20. document.title = document.title
  21. .replace(/^PostgreSQL: Documentation: \d+:\s*/, 'PGDoc: ')
  22. .replace('PGDoc: Chapter', 'PGDoc:');
  23. }
  24. })();