Skip to content

Instantly share code, notes, and snippets.

@dd-han
Created August 17, 2018 16:09
Show Gist options
  • Save dd-han/ddbe3a4931ee4af8c099ad2d1397999d to your computer and use it in GitHub Desktop.
Save dd-han/ddbe3a4931ee4af8c099ad2d1397999d to your computer and use it in GitHub Desktop.
新版的 KanColle Viewer 工具,配合 1366x768 的螢幕 +Firefox

KanColle Custom Viewer

因為之前用 VBS 寫給 IE 的 Scritp 不能用(IE11跑不出畫面),Chrome 在沒有顯卡的 VM 裡面超慢,所以就用 Firefox 把系統兜起來了。

設定

Firefox 需要調整 about:config 裡面的幾個參數:

  • dom.disable_window_open_feature.status
  • dom.disable_window_open_feature.resizable
  • dom.disable_window_open_feature.location

以上三個參數改為 false 後,開啟新 window 才能把布必要的項目隱藏、設定座標。

接著安裝 Violentmonkey後,打開控制台新建腳本,輸入下面 monkey.js 的內容

最後下載 launcher.html (按 Raw 後 Ctrl + S)後,用 Firefox 開啟 launcher.html 就可以得到尺寸很剛好的 KanColle 視窗啦

<script>
let option = "directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,innerWidth=1200,innerHeight=720,screenX=0,screenY=0";
window.open("http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/", "KanColle Window", option);
</script>
// ==UserScript==
// @name DMM KanColle Page Adjust
// @namespace kancolle-page-adjust.dd-han.tw
// @description Adjust DMM KanColle Page to Fit moniter only 1366x768
// @include http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/
// @grant none
// ==/UserScript==
document.getElementsByClassName('dmm-ntgnavi')[0].style.display = 'none';
document.getElementById('ntg-recommend').style.display = 'none';
document.getElementsByTagName('body')[0].style.overflow = 'hidden';
window.scrollTo(0, 16);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment