Skip to content

Instantly share code, notes, and snippets.

@NO-ob
Created March 22, 2021 12:01
Show Gist options
  • Save NO-ob/d193b004c15dedeb348aa05ab4a587e0 to your computer and use it in GitHub Desktop.
Save NO-ob/d193b004c15dedeb348aa05ab4a587e0 to your computer and use it in GitHub Desktop.

Revisions

  1. NO-ob created this gist Mar 22, 2021.
    21 changes: 21 additions & 0 deletions pixivImageFit.user.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    // ==UserScript==
    // @name Pixiv Image fit
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description Makes full image fit to screen
    // @author NO_ob
    // @match https://www.pixiv.net/en/artworks/*
    // @icon https://www.google.com/s2/favicons?domain=pixiv.net
    // @grant none
    // ==/UserScript==

    (function() {
    'use strict';
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = 'div[role=presentation] > div > div > div > img {max-width:100%}';
    head.appendChild(style);
    })();