Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
47e7ddc1
authored
Jan 09, 2025
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
6ad5dbf9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
public/static/js/sq.js
+21
-3
No files found.
public/static/js/sq.js
View file @
47e7ddc1
...
@@ -6,6 +6,24 @@ function replace_logo(){
...
@@ -6,6 +6,24 @@ function replace_logo(){
console
.
log
(
"Replace logo"
);
console
.
log
(
"Replace logo"
);
}
}
function
replaceKeywords
(
keyword
,
replacement
)
{
// 获取整个文档的body元素
var
body
=
document
.
body
;
// 创建一个空白的Range对象
var
range
=
document
.
createRange
();
// 选择body作为范围
range
.
selectNodeContents
(
body
);
// 将range内的内容转换为DocumentFragment
var
fragment
=
range
.
extractContents
();
// 遍历fragment的所有子节点
replaceText
(
fragment
,
keyword
,
replacement
);
// 将修改后的fragment重新插入到body中
body
.
appendChild
(
fragment
);
}
window
.
onload
=
function
()
{
replaceKeywords
(
'新橙科技'
,
'同知堂科技'
);
replaceKeywords
(
'粤ICP备15024370号-7'
,
'苏ICP备2023017636号-1'
);
};
replace_keywords
();
// replace_keywords();
replace_logo
();
// replace_logo();
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment