MCPcopy Index your code
hub / github.com/hoothin/UserScripts / init

Function init

Picviewer CE+/dist.user.js:12941–28698  ·  view source on GitHub ↗
(topObject,window,document,arrayFn,envir,storage,unsafeWindow)

Source from the content-addressed store, hash-verified

12939 target.appendChild(fragment);
12940 }
12941 async function init(topObject,window,document,arrayFn,envir,storage,unsafeWindow){
12942 await createPolicy();
12943 // 默认设置,请到设置界面修改
12944 prefs={
12945 floatBar:{//浮动工具栏相关设置.
12946 butonOrder:['actual','current','gallery','magnifier','download','stitch'],//按钮排列顺序'actual'(实际的图片),'current'(当前显示的图片),'magnifier'(放大镜观察),'gallery'(图集),'search'(搜索原图)
12947 additionalFeature: 'open',
12948 invertAdditionalFeature: false,
12949 listenBg:true,//监听背景图
12950 showDelay:100,//浮动工具栏显示延时.单位(毫秒)
12951 hideDelay:566,//浮动工具栏隐藏延时.单位(毫秒)
12952 position:'top left',// 取值为: 'top left'(图片左上角) 或者 'top right'(图片右上角) 'bottom right'(图片右下角) 'bottom left'(图片左下角);
12953 stayOut:false,
12954 stayOutOffsetX:0,
12955 stayOutOffsetY:0,
12956 download2copy:false,//废弃
12957 offset:{//浮动工具栏偏移.单位(像素)
12958 x:-15,//x轴偏移(正值,向右偏移,负值向左)
12959 y:-15,//y轴偏移(正值,向下,负值向上)
12960 },
12961 forceShow:{//在没有被缩放的图片上,但是大小超过下面设定的尺寸时,强制显示浮动框.
12962 enabled:true,//启用强制显示.
12963 size:{//图片尺寸.单位(像素);
12964 w:100,
12965 h:100,
12966 },
12967 },
12968 showWithRules:true,
12969 minSizeLimit:{//就算是图片被缩放了(看到的图片被设定了width或者height限定了大小,这种情况下),如果图片显示大小小于设定值,那么也不显示浮动工具栏.
12970 w:50,
12971 h:50,
12972 },
12973 sizeLimitOr:false,
12974
12975 keys: {
12976 enable: false,
12977 actual: 'a', // 当出现悬浮条时按下 `a` 打开原图
12978 search: 's',
12979 current: 'c',
12980 magnifier: 'm',
12981 gallery: 'g',
12982 download: 'd'
12983 },
12984 globalkeys: {
12985 invertInitShow: false,
12986 ctrl: true,
12987 alt: false,
12988 shift: false,
12989 command: false,
12990 type: "hold",
12991 closeAfterPreview: true,
12992 previewFollowMouse: true
12993 }
12994 },
12995
12996 magnifier:{//放大镜的设置.
12997 radius: 77,//默认半径.单位(像素).
12998 wheelZoom:{//滚轮缩放.

Callers 1

init2Function · 0.70

Calls 15

debugFunction · 0.85
containsMethod · 0.80
removeMethod · 0.80
pageActionMethod · 0.80
preloadMethod · 0.80
getPageMethod · 0.80
createPolicyFunction · 0.70
canonicalUriFunction · 0.70
cssProSupportedFunction · 0.70
cssValueSupportedFunction · 0.70
getSupportEventNameFunction · 0.70
getSupportedFunction · 0.70

Tested by

no test coverage detected