Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name pixiv
- // @namespace mugiseyebrows.ru
- // @include http://www.pixiv.net/
- // @version 1
- // @grant none
- // ==/UserScript==
- function loadjs(src,onload){
- var e = document.createElement('script');
- e.setAttribute("type","text/javascript");
- e.setAttribute("src", src);
- e.onload = onload;
- document.getElementsByTagName("head")[0].appendChild(e);
- }
- function appendImage(i) {
- console.log('appendImage');
- if (i>1) {
- $(images[Math.floor(Math.random()*images.length)]).appendTo('body');
- setTimeout(appendImage.bind(this,i-1),800);
- }
- }
- $(document).ready(function(){
- console.log('$(document).ready');
- $('<li class="bookmarks"><a href="#" id="my-images"><i class="_icon sprites-bookmarks"></i>img</a></li>').appendTo( '.navigation-list ul' );
- $('nav.navigation-list').css('font-size','11px')
- $('#my-images').click(function(){
- $('body').html('');
- loadjs('http://mugiseyebrows.ru/pixiv/data.js',appendImage.bind(this,300));
- return false;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement