mirror of
https://github.com/Hopiu/annotate-extension.git
synced 2026-03-17 00:10:23 +00:00
Support for functions added to prototype
This commit is contained in:
parent
d55ffb9a27
commit
bb1b7ffbe0
1 changed files with 11 additions and 0 deletions
11
main.js
11
main.js
|
|
@ -140,6 +140,17 @@ define(function (require, exports, module) {
|
|||
params: results.slice(2),
|
||||
prefix: getPrefix(txtFrom, results[0])
|
||||
};
|
||||
} else if(txtFrom.indexOf('.prototype.')){
|
||||
var i = 1;
|
||||
for(;i<results.length; i+=1){
|
||||
if(results[i] === 'function'){
|
||||
return {
|
||||
name: results[i-1],
|
||||
params: results.slice(i+1),
|
||||
prefix: getPrefix(txtFrom, results[0])
|
||||
};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue