mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-11 09:24:58 +00:00
Update chrome.js
This commit is contained in:
parent
6a0491c419
commit
04c2325ade
|
@ -1223,7 +1223,35 @@ var ChromeObject = function(interfaces) {
|
|||
if (pos === 0)
|
||||
return 'decodeURIComponent("' + value.substring(10) + '")';
|
||||
else
|
||||
return 'decodeURIComponent("' + encodeURIComponent(value) + '")';
|
||||
return 'decodeURIComponent("' + this.encodeURIComponent(value)[0] + '")';
|
||||
};
|
||||
|
||||
// Added in 2024-01-08
|
||||
this.encodeURI = function(s) {
|
||||
return [encodeURI(s), s];
|
||||
};
|
||||
|
||||
// Added in 2024-01-08
|
||||
this.decodeURI = function(s) {
|
||||
if (s instanceof Array && s.length == 2) {
|
||||
return s[1];
|
||||
} else {
|
||||
return decodeURI(s);
|
||||
}
|
||||
};
|
||||
|
||||
// Added in 2024-01-08
|
||||
this.encodeURIComponent = function(s) {
|
||||
return [encodeURIComponent(s), s];
|
||||
};
|
||||
|
||||
// Added in 2024-01-08
|
||||
this.decodeURIComponent = function(s) {
|
||||
if (s instanceof Array && s.length == 2) {
|
||||
return s[1];
|
||||
} else {
|
||||
return decodeURIComponent(s);
|
||||
}
|
||||
};
|
||||
|
||||
this.prompt = function(s) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user