Answer the question
In order to leave comments, you need to log in
Javascript - define page/site JS framework?
Actually, the whole question is in the title: is there a ready-made algorithm for determining the JS framework that is loaded on this page (and is there any loaded at all)?
Answer the question
In order to leave comments, you need to log in
If I understand the task correctly, then for jQuery something like this:
if (type of jQuery != 'undefined')
For other frameworks, similarly.
For those that only use the "original" $ variable, unique methods and properties can be checked.
Well, I would do this - Opera DragonFly - would open the scripts, see what is being used ... and in most cases, you can already determine by the first lines of code. either through firebug... or chrome dev panel...
var knownFrameworks = [];
knownFrameworks.push('$','_','Handlebars' ...);
for (name in window) {
if (knownFrameworks.indexOf(name) >= 0 ) {
console.log('detected ' + name )
}
}
Try this chrome
extension chrome.google.com/webstore/detail/library-detector/cgaocdmhkmfnkdkbnckgmpopcbpaaejo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question