Remove Text Fragment

Remove Text Fragment from Google search result URLs

2021-08-20 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

// ==UserScript==
// @name            Remove Text Fragment
// @namespace       https://gf.zukizuki.org/users/783910
// @name:ja         Text Fragmentの削除
// @version         0.2
// @description     Remove Text Fragment from Google search result URLs
// @description:ja  Google検索結果のURLからText Fragmentを削除する
// @author          ysnr777
// @match           https://www.google.com/search?*
// @grant           none
// ==/UserScript==

(function() {
  'use strict';
  for (const el of document.querySelectorAll("a[href*=':~:']")) {
    el.href = el.href.replace(/#:~:[^"]*/, '');
  }
})();