NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
/** The MIT License (MIT) Copyright (c) 2019 Anveshak Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **/ // ==UserScript== // @name Shadow Selection // @namespace Anveshak // @description Switch to an Awesome Shadow based text selection style for your browser. Works perfectly with almost all popular browsers. Easily edit the shadow color to any color of your choice. // @include * // @version 2.0.5 // @license MIT // @copyright 2019, Anveshak // @icon http://oi63.tinypic.com/142f1tx.jpg // @oujs:author Anveshak // @grant GM_info // @grant GM_setValue // @grant GM_getValue // @grant GM_xmlhttpRequest // @grant GM_getTab // @grant GM_saveTab // @downloadURL https://firebasestorage.googleapis.com/v0/b/shadow-selection.appspot.com/o/ShadowSelection.user.js?alt=media // @updateURL https://firebasestorage.googleapis.com/v0/b/shadow-selection.appspot.com/o/ShadowSelection.user.js?alt=media // @connect shadowsel.com // @connect * // ==/UserScript== var style=document.createElement("style"); // Change the "text-shadow" property to change the Shadow Position and color. Syntax is give below. // text-shadow: <X-position>px <Y-position>px <Shadow-Depth>px <color-hex-code>. // #0048FF (Blue Color) is used as default Shadow Selection color. // Use #352E7E to make it a dark blue color. // Use #EA4200 (Ubuntu's orange color) for Ubuntu's firefox. //For Firefox (Gecko) Browser style.innerHTML = "::-moz-selection { color: #000; background: none repeat scroll 100% 0% transparent;text-shadow: 0px 0px 2px #0048FF;} a::selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 2px 2px 2px #0048FF;}"; //For Chrome (Blink) Browser style.innerHTML +=" ::selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 2px 0px 2px #0048FF;} input::selection { color: #3356C6; background: none repeat scroll 0% 0% transparent;} a::selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 2px 0px 2px #0048FF;}"; //For WebKit Browser style.innerHTML +=" ::-webkit-selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 0px 0px 2px #0048FF;} a::selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 2px 2px 2px #0048FF;}"; //For Other Browsers style.innerHTML +=" ::-ms-selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 0px 0px 2px #0048FF;} a::selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 2px 2px 2px #0048FF;}"; style.innerHTML +=" ::-o-selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 0px 0px 2px #0048FF;} a::selection { color: #000; background: none repeat scroll 0% 0% transparent;text-shadow: 2px 2px 2px #0048FF;}"; document.body.appendChild(style);