Greasy Fork is available in English.
旋转90度看图,自动滚动
当前为
// ==UserScript==
// @name 竖版看图
// @namespace http://tampermonkey.net/
// @version 0.15
// @description 旋转90度看图,自动滚动
// @author You
// @match *://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=pixabay.com
// @grant none
// @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
// @license MIT
// ==/UserScript==
(function() {
'use strict';
var Dscroll = 0;
var Dhide = 0;
var timeDown;
var scrollJu = 90;
var bottom = 150;
var left = 85;
var jianG = 40;
var degZ = 90
var scaleZ = 0.56
$("body").append("<input type='button' id='Jscroll-jian' value='-' style='z-index: 9999;border:1px solid white;width:30px;margin-left:10px;height:25px;background-color:black;color:white;position:fixed;left:" + left + "px;bottom:" + (bottom+5*jianG) + "px'>")
.append("<input type='button' id='Jscroll-jia' value='+' style='z-index: 9999;border:1px solid white;width:30px;margin-left:10px;height:25px;background-color:black;color:white;position:fixed;left:" + left + "px;bottom:" + (bottom + 4*jianG) + "px'>")
.append("<input type='button' id='Jscroll-Ju' value='" + scrollJu + "' style='z-index: 9999;border:1px solid white;width:40px;height:25px;background-color:black;color:white;position:fixed;left:" + left + "px;bottom:" + (bottom + 3 * jianG) + "px'>")
.append("<input type='button' id='Jscroll-deg' value='" + degZ + "°' style='z-index: 9999;border:1px solid white;width:40px;height:25px;background-color:black;color:white;position:fixed;left:" + left + "px;bottom:" + (bottom + 2*jianG) + "px'>")
.append("<input type='button' id='Jscroll-scale' value='" + scaleZ + "' style='z-index: 9999;border:1px solid white;width:40px;height:25px;background-color:black;color:white;position:fixed;left:" + left + "px;bottom:" + (bottom + jianG) + "px'>")
.append("<input type='button' id='Jscroll-del' value='X' style='z-index: 9999;border:1px solid white;width:30px;margin-left:10px;height:25px;background-color:black;color:white;position:fixed;left:" + left + "px;bottom:" + (bottom) + "px'>");
$("#Jscroll-jia").click(function () {
scrollJu += 30;
$("#Jscroll-Ju").val(scrollJu);
});
$("#Jscroll-deg").click(function () {
degZ += 90;
degZ = degZ % 360;
$("#Jscroll-deg").val(degZ + "°");
});
$("#Jscroll-scale").click(function () {
scaleZ -= 0.04;
if(scaleZ <= 0){
scaleZ = 0.56
}
$("#Jscroll-scale").val(scaleZ.toFixed (2));
$("img").css("cssText", "-webkit-transform: rotate("+degZ+"deg) scale("+scaleZ+") !important");
})
$("#Jscroll-del").click(function () {
Dhide += 1; if (Dhide % 2 != 0) {
$("#Jscroll-jia").hide();
$("#Jscroll-jian").hide();
$("#Jscroll-Ju").hide();
$("#Jscroll-deg").hide();
$("#Jscroll-scale").hide();
$("#Jscroll-del").css("opacity","0.4");
}else{
$("#Jscroll-jia").show();
$("#Jscroll-jian").show();
$("#Jscroll-Ju").show();
$("#Jscroll-deg").show();
$("#Jscroll-scale").show();
$("#Jscroll-del").css("opacity","1");
}
});
$("#Jscroll-jian").click(function () {
scrollJu -= 30;
$("#Jscroll-Ju").val(scrollJu);
});
$("#Jscroll-Ju").click(function () {
Dscroll += 1;
if (Dscroll % 2 != 0) {
if (scrollJu < 200) {
$("img").css("cssText", "-webkit-transform: rotate("+degZ+"deg) scale("+scaleZ+") !important");
}
timeDown = setInterval(function () {
window.scrollBy(0, scrollJu)
}, 4000)
$("#Jscroll-Ju").css("color","green");
$("#Jscroll-del").click();
} else {
clearInterval(timeDown)
if (scrollJu < 200) {
$("img").css("cssText", "-webkit-transform: rotate (0deg) scale(1) !important");
}
$("#Jscroll-Ju").css("color","white");
}
});
// Your code here...
})();