lib:strict

none

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

작성자
rssa_romeo
일일 설치 수
0
총 설치 수
3
평점
0 0 0
버전
7
생성일
2024-04-10
갱신일
2025-03-17
크기
11.8KB
라이선스
GPLv3
적용 사이트
모든 사이트

example:

with (loadlib("strict")) {
      obj.forEach((obj) =>
        testformat(obj, {
          text: condfunc(({ key }) =>
            setformat({ type: key ? ["string", "none"] : ["string"] })
          ),
          key: condfunc(({ text }) =>
            setformat({ type: text ? ["string", "none"] : ["string"] })
          ),
          type: setformat({
            value: [
              "button",
              "boolean",
              "text",
              "number",
              "key",
              "none",
              "select",
              "range",
              "color",
              "array",
            ],
          }),
          forcelower: condfunc((obj) => {
            return setformat({
              value: ["text", "key"].includes(obj.type)
                ? [true, false, undefined]
                : [undefined],
            })
          }),
          tab: optional(setformat({ type: "number" })),
          innerstyle: optional(
            setformat(
              {},
              { allowextras: true, extrasformat: { type: ["string"] } }
            )
          ),
          outerstyle: optional(
            setformat(
              {},
              { allowextras: true, extrasformat: { type: ["string"] } }
            )
          ),
          buttontext: condfunc((obj) => {
            return setformat({
              type: obj.type == "button" ? ["string"] : ["none"],
            })
          }),
          hint: optional(setformat({ type: ["string"] })),
          onclick: condfunc((obj) => {
            return setformat({
              type:
                obj.type == "button" ? ["function", "asyncfunction"] : ["none"],
            })
          }),
          options: condfunc((obj) => {
            return setformat({
              type: obj.type == "select" ? ["array"] : ["none"],
            })
          }),
          oncontextmenu: condfunc((obj) => {
            return setformat({
              type:
                obj.type == "button" ? ["function", "asyncfunction"] : ["none"],
            })
          }),
          min: condfunc((obj) => {
            return setformat({
              type: obj.type == "range" ? ["number"] : ["none"],
            })
          }),
          max: condfunc((obj) => {
            return setformat({
              type: obj.type == "range" ? ["number"] : ["none"],
            })
          }),
          hinttype: condfunc((obj) => {
            return setformat({
              value: "hint" in obj ? ["text", "html"] : [undefined],
            })
          }),
          allowmodifiers: condfunc((obj) => {
            return setformat({
              value: obj.type == "key" ? [true, false] : [undefined],
            })
          }),
          keyreturntype: condfunc((obj) => {
            return setformat({
              value: obj.type == "key" ? ["object", "string"] : [undefined],
            })
          }),
        })
      )
    }

example used in https://greasyfork.org/en/scripts/492112-options-menu-lib-menu