Fix New-Window Links (Remove target Attribute)

Remove the target attribute from the links matching the given string.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Gavin Borg
今日安裝
0
安裝總數
71
評價
0 0 0
版本
1.0
建立日期
2020-06-04
更新日期
2020-06-04
尺寸
3.1 KB
授權條款
未知
腳本執行於

This script removes the target attribute from links with the specified path, so that clicking them opens in the current tab/window instead of a new one.

How to Use

  1. Add the sites you want to either the user includes or user matches - this script only runs on the greasyfork installation page for this script by default (feel free to remove that one).
  2. Open one of the pages that match your sites.
  3. Open the settings page using the sub-menu item for the script.
  4. Enter jQuery-style selectors for the links that you want to open in the same tab/window.
  5. Save and close the settings.
  6. Repeat for other sites.

After that, the links you've specified should always open in the same tab/window.

Notes

  • This script uses the first matching user include/match to store/retrieve your settings, so I'd recommend against overlapping rules there.
  • The settings are saved locally, so you should be able to export/import as needed using the "Storage" tab in Tampermonkey or similar.

Changelog

  • 1.0 (6/4/20)
    • Initial release

Source: GitHub. Please direct all issues/questions there.

Available on Greasy Fork for easy installation.