CulMen / Kancolle full for 2nd Sequence

// ==UserScript==
// @name            Kancolle full for 2nd Sequence
// @namespace       https://userstyles.org/styles/163415/theme
// @description     plz use with https://userstyles.org/styles/163415/theme
// @version         1.0
// @author          2018, CulMen (https://openuserjs.org//users/CulMen)
// @license         MIT
// @include         http://203.104.105.167/kcs*
// @include         http://203.104.209.87/kcs*
// @include         http://125.6.184.16/kcs*
// @include         http://125.6.187.205/kcs*
// @include         http://125.6.187.229/kcs*
// @include         http://125.6.187.253/kcs*
// @include         http://125.6.188.25/kcs*
// @include         http://203.104.248.135/kcs*
// @include         http://125.6.189.7/kcs*
// @include         http://125.6.189.39/kcs*
// @include         http://125.6.189.71/kcs*
// @include         http://125.6.189.103/kcs*
// @include         http://125.6.189.135/kcs*
// @include         http://125.6.189.167/kcs*
// @include         http://125.6.189.215/kcs*
// @include         http://125.6.189.247/kcs*
// @include         http://203.104.209.23/kcs*
// @include         http://203.104.209.39/kcs*
// @include         http://203.104.209.55/kcs*
// @include         http://203.104.209.102/kcs*
// @require          https://code.jquery.com/jquery-2.2.4.min.js
// ==/UserScript==

var $ = window.jQuery;
$(function() {
    'use strict';

    // Your code here...
    var editleft,edittop,editsize,editwidth;
    var pleft,pvw=0;
    var edit;
    // 艦隊名・自己紹介入力欄の位置調整
    function setedit(edit){
        var vh = $(window).height();
        var vw = $(window).width();
            $('#r_editarea').css('left',Math.trunc(vw*edit.left/1200));
            $('#r_editarea').css('top',Math.trunc(vh*edit.top/720));
            $('#r_editbox').css('font-size',Math.trunc(edit.size*vw/1200*96/72));
            $('#r_editbox').css('height',Math.trunc(edit.size*vw/1200*96/72));
            $('#r_editbox').css('width',Math.trunc(edit.width*vw/1200));
    }

    edit = setInterval(Interval, 500);

    // 入力欄の位置基準設定
    function changepage(edit){
        var obj = new Object();
        //alert($('#r_editarea').css('left'));
        if($('#r_editarea').css('left')=="780px"){//自己紹介
            obj.left=780;
            obj.top=155;
            obj.size=20.25;
            obj.width=332;
        }else if($('#r_editarea').css('left')=="277px"){//艦隊名
            obj.left=277;
            obj.top=337;
            obj.size=16;
            obj.width=300
        }else if($('#r_editarea').css('left')=="880px"){//基地航空隊
            obj.left=880;
            obj.top=279;
            obj.size=16;
            obj.width=300
        }
        //alert(obj.left);
        //alert(edit.left);
        if(obj.left===undefined){obj=edit;}
        return obj;
    }

    // 自動実行
    function Interval(){
        edit = changepage(edit);
        //alert(edit.left);
        setedit(edit);
    }

})();