Remove Amazon popups

Some marketing idiot at Amazon must have decided to make every link a popup. This script prevents Amazon links from opening a new tab.

  1. // ==UserScript==
  2. // @id Remove Amazon popups
  3. // @name Remove Amazon popups
  4. // @description Some marketing idiot at Amazon must have decided to make every link a popup. This script prevents Amazon links from opening a new tab.
  5. // @include https://www.amazon.*
  6. // @version 0.0.1
  7. // @namespace https://greatest.deepsurf.us/users/39602
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. [].forEach.call(document.querySelectorAll('a[target="_blank"]'),
  14. function(link) {
  15. link.removeAttribute('target');
  16. });
  17. })();