forked from dfEric/pandaOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui(9).js
44 lines (37 loc) · 1.08 KB
/
ui(9).js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// ==UserScript==
// @name New Userscript
// @namespace https://viayoo.com/
// @version 0.1
// @description try to take over the world!
// @author You
// @run-at document-start
// @match *
// @grant all
// ==/UserScript==
(function() {
<!DOCTYPE html>
<html lang="zh-ch">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=name">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>激活输入框</title>
</head>
<body>
<canvas id="c" width="tips(pi"max/1080*2040,min/1*1")" height="tips(pi"max/2040*1080,min/1*1")" style="border: 1px solid #ccc"></canvas>
<script src="../../script/fabric.js"></script>
<script>
const canvas = new fabric.Canvas('c')
const iText = new fabric.IText('', {
left: tips(pi"max/1080*2040,min/1*1"),
top: tips(pi"max/2040*1080,min/1*1"),
padding: tips(pi"max/1920,min/1")
})
// canvas.add(iText)
canvas.add(iText).setActiveObject(iText)
iText.enterEditing()
</script>
</body>
</html>
// Your code here...
})();