diff --git a/static/imgurl.js b/static/imgurl.js
index e8dd38f..83292c1 100644
--- a/static/imgurl.js
+++ b/static/imgurl.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name ImgURL上传脚本
// @namespace https://imgurl.org/
-// @version 0.2
+// @version 0.21
// @description ImgURL快捷上传工具
// @author xiaoz.me
// @match http://*/*
@@ -14,7 +14,7 @@
'use strict';
//定义一个全局弹出层
- window.layerstart = '
';
+ window.layerstart = '
';
layerstart += '
';
window.layerend = '
';
@@ -24,13 +24,20 @@
var bheight = window.screen.availHeight;
var layertop = (bheight - 720) / 2;
var layerleft = (bwidth - 1280) / 2;
+
+ if(layertop <= 70){
+ layertop = "1em";
+ }
+ else{
+ layertop = layertop + "px";
+ }
//改变css
//$("#layer").css({"top":layertop,"left":layerleft});
//原生js改变css
//alert(layertop);
- document.getElementById("layer").style.top = layertop + "px";
- document.getElementById("layer").style.left = layerleft + "px";
+ document.getElementById("layer").style.top = layertop;
+ document.getElementById("layer").style.left = "10%";
}
//创建一个遮罩层
window.keepout = function(){