Skip to content

Commit

Permalink
feat: use GM_addstyle to append style
Browse files Browse the repository at this point in the history
  • Loading branch information
Arylo committed Jun 18, 2024
1 parent 6de719d commit 8a793ee
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/monkey/gitlab-font-family.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Add Font Family for Gitlab",
"version": "1.2",
"version": "1.3",
"include": [
"/^https:\/\/git\\b.[^\/]+\/.*\/-\/raw\/.*/",
"/^https:\/\/git\\b.[^\/]+\/.*\/-\/blob\/.*/",
Expand All @@ -9,5 +9,5 @@
"/^https:\/\/git\\b.[^\/]+\/.*\/-\/merge_requests\/(\\d+|new)\/diffs\\b/"
],
"run-at": "document-end",
"grant": "none"
"grant": "GM_addStyle"
}
3 changes: 1 addition & 2 deletions src/monkey/gitlab-font-family.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import css from './gitlab-font-family.css'
import { appendStyleElement } from './utils/appendStyleElement'

setTimeout(() => appendStyleElement(css, 'append-font'), 25)
setTimeout(() => GM_addStyle(css), 25)

export {}
4 changes: 2 additions & 2 deletions src/monkey/gitlab-settings-max-size.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Max Size CI/CD Setting Page for Gitlab",
"version": "1.1",
"version": "1.3",
"include": "/^https:\/\/git\\b.[^\/]+\/.*\/-\/settings\/ci_cd$/",
"run-at": "document-end",
"grant": "none"
"grant": "GM_addStyle"
}
3 changes: 1 addition & 2 deletions src/monkey/gitlab-settings-max-size.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import css from './gitlab-settings-max-size.css';
import { appendStyleElement } from "./utils/appendStyleElement";

setTimeout(() => appendStyleElement(css, 'max-size'), 25)
setTimeout(() => GM_addStyle(css), 25)

export {}
1 change: 1 addition & 0 deletions types/monkey.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare function GM_addStyle(content: string): undefined;

0 comments on commit 8a793ee

Please sign in to comment.