NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name baidu yo man // @namespace https://none.com/ // @version 0.0.2 // @description example script to hover "yo, man!" on every page under baidu.com // @grant unsafeWindow // @include *://*.baidu.com/* // @require http://libs.useso.com/js/jquery/2.1.1/jquery.min.js // ==/UserScript== var namespace1 = function(){ //Avoid conflicts this.$ = this.jQuery = jQuery.noConflict(true); function test1(){ alert('Hello world!'); }; function test2(){ $('div').css('background-color', 'yellow'); }; function test3(){ $('body').append("<p id='gm_1'>yo, man!</p>"); $('#gm_1').css('background-color', 'yellow'); }; function test4(){ $('body').prepend("<p id='gm_1'>yo, man!</p>"); $('#gm_1').css('background-color', 'yellow'); $('#gm_1').attr("class", "gm_1c"); $('.gm_1c').css('color', 'white'); }; function test51(){ $('body').prepend("<p id='gm_1'>yo, man!</p>"); $('#gm_1').css('background-color', 'yellow'); $('#gm_1').css('font-size', '200%'); $('#gm_1').css('position', 'relative'); }; function test52(){ $('body').prepend("<p id='gm_1'>yo, man!</p>"); $('#gm_1').css('background-color', 'yellow'); $('#gm_1').css('font-size', '200%'); $('#gm_1').css({ position: 'absolute', top: '100px', left: '50px', width: '200px'}); }; function test53(){ $('body').prepend("<p id='gm_1'>yo, man!</p>"); $('#gm_1').css('background-color', 'yellow'); $('#gm_1').css('font-size', '200%'); $('#gm_1').css({ position: 'fixed', top: '100px', left: '50px', width: '200px'}); }; $(document).ready(function(){ test53(); }); }; namespace1();