This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Aliexpress/eBay/Gearbest/Amazon URL Shortener | |
// @namespace http://tampermonkey.net/ | |
// @version 0.5 | |
// @author hedgehog, core.equip | |
// @match https://*.aliexpress.com/item/* | |
// @match https://*.ebay.de/itm/* | |
// @match https://*.ebay.com/itm/* | |
// @match https://*.gearbest.com/* | |
// @match https://*.amazon.de/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( $ ) { | |
$.fn.readOnlySuffix = function(suffix) { | |
return this.each(function() { | |
var $this = $(this), | |
suffixLength = suffix.length, | |
oldValue = suffix, | |
mouseIsDown = false; | |
// Must be a text input or text area | |
if (!($this.is(":text") || $this.tagName.toLowerCase() == "textarea")){ |