Skip to content

Instantly share code, notes, and snippets.

@nanakoso
Created September 30, 2009 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanakoso/197959 to your computer and use it in GitHub Desktop.
Save nanakoso/197959 to your computer and use it in GitHub Desktop.
[pixiv] BookmarkButtonLayer
// ==UserScript==
// @name PixivBookmarkButtonLayer
// @version 0.20
// @namespace http://www14.atwiki.jp/pizivhacker/
// @description PIXIVのお気に入り、ブックマークのボタンのレイヤー化
// @include http://www.pixiv.net/bookmark.php*
// @require https://gist.github.com/raw/3242/9dc0cdee5e975d275c7ab71f581d272eb316674f/dollarX.js
// ==/UserScript==
(function(){
try{
var url = window.location.href;
if( url.indexOf("&id=") >= 0 || url.indexOf("?id=") >= 0
|| url.indexOf("type=reg_user") >= 0){
return;
}
var ID_NAME = "button-layer-div";
var A_COLOR = "#2266aa";
var BUTTON_LAYER_STYLE = ["div#" + ID_NAME + "{position:fixed"
," bottom:0px"
," right:0px"
," z-index:100"
," opacity:0.85"
," border-style:solid"
," border-color:" + A_COLOR
," border-width:1px"
," margin:10px"
," padding:4px"
," background:#ffffff"
," color:#000000"
," text-align:left"
,"}"].join(";\n")
GM_addStyle( BUTTON_LAYER_STYLE );
GM_addStyle( "div#" + ID_NAME + " a{color:" + A_COLOR + ";}" );
var div = $X( '//div[@class="msgbox_bottom"]' )[0];
div.id = ID_NAME;
div.style.borderTop="";
var goTop = $X( '//div[@class="gototop"]' )[0];
div.insertBefore(goTop,div.firstChild);
}catch(e){
GM_log("exception:"+e);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment