Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deflis/eacf32810dbc06c9ca5e8e9ad4dc7128 to your computer and use it in GitHub Desktop.
Save deflis/eacf32810dbc06c9ca5e8e9ad4dc7128 to your computer and use it in GitHub Desktop.
pixivのあれこれ
// ==UserScript==
// @name イラスト・小説ページでコメントを表示しないようにする
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.pixiv.net/novel/show.php*
// @match http://www.pixiv.net/member_illust.php*
// @require https://code.jquery.com/jquery-2.2.2.min.js
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
// Your code here...
let element = $("#one_comment");
element.hide();
let button = $("<a class='button'>開く</a>");
let container = $("<div class='line line-1' style='text-align: center;'>").append(button);
button.click(() => { element.show(); container.hide(); });
element.before(container);
.ads_area,
.ads_anchor,
.require-premium,
.ads-top-info,
.NewsTop,
.ads_sensei,
body > div.premium-header-banner,
#header-banner > .multi-ads-area,
#column-misc > section.ad,
#column-misc > section.recruit-ad,
#page-mypage > div.ui-layout-east > div > div.contents-main > a._mypage-premium-banner,
#wrapper > div.layout-body > div > aside,
#wrapper > div.layout-body > div:nth-child(1) > section.comic-hot-works,
#wrapper > div.layout-body > div:nth-child(1) > section.popular-introduction,
#item-container > section.item.featured-tags > section > section:nth-child(1),
#item-container > section.item.featured-tags > section > section:nth-child(2),
#item-container > section.item.featured-tags > section > section:nth-child(3),
body > header > div > nav.link-list > ul > li:nth-child(2) > strong > a,
body > aside > a.ad-printservice
{
display: none !important;
}
#wrapper > div.layout-body > div:nth-child(1) > section.popular-introduction > ul,
#wrapper > div.layout-body > div:nth-child(1) > section.popular-introduction > div {
background-color: #fff !important;
}
#wrapper > div.layout-body > div:nth-child(1) > section.column-search-result > ul > li:nth-child(6) {
height: 249px !important;
}
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.pixiv.net/member_illust.php?mode=manga&illust_id=*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
let element = $("#main > footer > div.layout-wrapper");
element.hide();
let newElement = $("<div class=\"layout-wrapper\">");
let container = $("<div class=\"bookmark-container\">");
let button = $("<a class=\"_button\">開く</a>");
let openCmd = function() {
element.show();
button.text("閉じる");
button.off("click", openCmd);
button.on("click", closeCmd);
};
let closeCmd = function() {
element.hide();
button.text("開く");
button.off("click", closeCmd);
button.on("click", openCmd);
};
button.on("click", openCmd);
container.append(button);
newElement.append(container);
element.before(newElement);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment