您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
艦これのゲーム画面をウィンドウと同じサイズに拡大/縮小
// ==UserScript== // @name Kancolle Scaler // @namespace http://hisaruki.tumblr.com/ // @version 2 // @description 艦これのゲーム画面をウィンドウと同じサイズに拡大/縮小 // @author hisaruki // @match http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/ // @grant none // ==/UserScript== (function() { 'use strict'; $("*").css("overflow", "hidden"); let d = $("<div></div>"); $("body").append(d); d.css("background-size", "cover"); d.css("width", "100%"); d.css("height", "100%"); d.css("position", "absolute"); d.css("left", "0px"); d.css("top", "0px"); d.css("z-index", 2); d.css("background", "#fff"); $("#game_frame").css("position", "fixed"); $("#game_frame").css("left", "0px"); $("#game_frame").css("top", "-16px"); $("#game_frame").css("z-index", 3); $("#game_frame").css("transform-origin-x", "left"); $("#game_frame").css("transform-origin-y", "top"); $("#game_frame").css("height", "inherit"); let resize = function(){ let w = $("#game_frame").width(); let h = $("#game_frame").height(); w = 1200; //h = 860; h = 720; let scale = Math.min.apply(null, [ window.innerWidth / w, window.innerHeight / h, ]); $("#game_frame").css("transform", "scale("+scale+")"); let left = (window.innerWidth - ($("#game_frame").width() * scale))/2; let top = -16 * scale; $("#game_frame").css("left", left); $("#game_frame").css("top", top); return scale; } resize(); $(window).resize(function() { resize(); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址