Scale Sankaku Beta

Resizes pics on Sankaku beta to full window size when you touch the left side of the window with your cursor. Uses the Magic Kernel Sharp algorithm for scaling.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
octopushugger
今日安裝
0
安裝總數
289
評價
0 0 0
版本
0.1.3
建立日期
2022-02-23
更新日期
2022-03-05
尺寸
39.5 KB
授權條款
WTFPL
腳本執行於

Resizes pics to full window size when you touch the left side of the window with your cursor. Uses the Magic Kernel Sharp algorithm for scaling (you need to allow cross origin resource access for this, it will ask you for it).

If you choose to deny cross origin resource access it should still work just without high quality scaling.

Screenshot

This script is designed to work with the browser extension Imagus but it’s not needed.
https://www.google.com/search?q=Imagus
( If you use Imagus: Set popup location to center in Imagus options to make it look less jank, also sadly for contentious content Imagus will only load thumbnails. If you want to enable the script for Imagus on all sites change the line // @match *://beta.sankakucomplex.com/* to // @match *://*/* )

Hotkeys:

  • 0 to load Original
  • N to enable/disable Sankaku popup without moving mouse
  • M to show/hide currently scaled image
  • F11 for fullscreen obviously

Large credit to the creators of pica of which this script makes heavy use of: https://github.com/nodeca/pica

Things to note:

  • If you don’t have premium and your arrow keys suddenly stop working it’s probably because the ad popup has popped up under the image.
  • There is a bug in Firefox where if any window resizing is done the popup will not stay up when you press the arrow keys. Press back and then forward to fix it.
  • If you press 0 too fast before the sidebar is fully loaded you’ll have to press it again.
  • There may be more bugs in Chrome since most of my testing was done in Firefox.
  • Videos are not currently supported.
  • I don't know why but this script breaks drop downs on some sites. Probably not an issue if you only use it on Sankaku.
  • Very high resolution images may cause performance issues.
  • This script may break at any time when Beta gets updated.
  • Don’t look too closely at the code, I just started learning JavaScript.