Skip to content

Commit

Permalink
Fix GM_deleteValue
Browse files Browse the repository at this point in the history
  • Loading branch information
JingMatrix committed Mar 13, 2023
1 parent fba29b3 commit a36ea70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/org/matrix/chromext/script/LocalScripts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ fun encodeScript(script: Script): String? {
"unsafeWindow" -> code = "const unsafeWindow = window;" + code
"GM_log" -> code = "const GM_log = console.log.bind(console);" + code
"GM_deleteValue" ->
code = "const GM_deleteValue = localStorage.removeItem.bind(localStorage);" + code
code =
"function GM_deleteValue(key) {localStorage.removeItem(key + '_ChromeXt_Value')};" +
code
"GM_setValue" ->
code =
"function GM_setValue(key, value) {localStorage.setItem(key + '_ChromeXt_Value', JSON.stringify(value))};" +
Expand Down

0 comments on commit a36ea70

Please sign in to comment.