Skip to content

Commit

Permalink
Change to HookAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
0x24a committed Jul 13, 2024
1 parent b058097 commit 044b220
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/pangu/pangu-module.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import pangu from 'https://cdn.skypack.dev/pangu@4.0.7';
var original_pushMessage = pushMessage
function pushMessage(args, options = {},padId="messages",makeunread=true){
if(args.text){
args.text=pangu.spacing(args.text)
function panguPushHook(args){
if(args[0].text){
args[0].text=pangu.spacing(args[0].text)
}
original_pushMessage(args, options, padId, makeunread)
return args
}
hook.register("before", "pushmessage", panguPushHook)
pangu.spacingPageBody()
console.log("Pangu Loaded!")

0 comments on commit 044b220

Please sign in to comment.