mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 17:05:14 +00:00
Update chrome.js
This commit is contained in:
parent
e8e08c5a2d
commit
d084be3598
|
@ -325,6 +325,21 @@ var ChromeObject = function() {
|
|||
}, []);
|
||||
};
|
||||
|
||||
this.getParameterValue = function(paramName) {
|
||||
var paramValue;
|
||||
var page = this.getPageById(this.pageId);
|
||||
var params = page.url.split('&');
|
||||
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
if (params[i].indexOf(paramName + '=') == 0) {
|
||||
paramValue = params[i].substring((paramName + '=').length);
|
||||
//break; // Do not break because will be get the last value
|
||||
}
|
||||
}
|
||||
|
||||
return paramValue;
|
||||
};
|
||||
|
||||
this.sendPageRPC = function(method, params) {
|
||||
var result = null;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user