Pixiv Medium Page Replace With Original

Replace Pixiv medium page's image with original image

Ajankohdalta 24.6.2018. Katso uusin versio.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Pixiv Medium Page Replace With Original
// @namespace    https://blog.maple3142.net/
// @version      0.1
// @description  Replace Pixiv medium page's image with original image
// @author       maple3142
// @match        https://www.pixiv.net/member_illust.php?mode=medium&illust_id=*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict'

    const PREFIX=Math.random().toString(36)
    Object.defineProperty(Object.prototype,'props',{
        set(v){
            this[PREFIX+'_props']=v
            if(v.urls)onTarget(this)
        },
        get(v){
            return this[PREFIX+'_props']
        }
    })
    function onTarget(target){
        const url=target.props.urls.original
        target.props.urls=new Proxy({},{
            get: ()=>url
        })
    }
})()