https://github.com/thinkphp/request.keywords
This is a quick hack based on MooTools which tries to find keywords connected to a certain term.
https://github.com/thinkphp/request.keywords
Last synced: 7 months ago
JSON representation
This is a quick hack based on MooTools which tries to find keywords connected to a certain term.
- Host: GitHub
- URL: https://github.com/thinkphp/request.keywords
- Owner: thinkphp
- Created: 2010-07-28T12:06:30.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-11-18T19:42:15.000Z (about 15 years ago)
- Last Synced: 2025-05-17T15:09:31.773Z (9 months ago)
- Language: JavaScript
- Homepage: http://thinkphp.github.com/Request.Keywords/
- Size: 121 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Request.Keywords
=======================
Request.Keywords is plugin MooTools which tries to find keywords connected to a certain term.

How to use
----------
First you must to include the JS files in the head of your HTML document.
#HTML
In your JavaScript source:
#JS
window.addEvent('domready',function(){
new Request.Keywords('mootools', 'us', 'en', {
onSuccess: function(o) {
if(window.console) {console.log(o);}
if(o.query.results.keywords) {
var term = o.query.results.keywords.search;
var kw = o.query.results.keywords.terms;
var language = o.query.results.keywords.language;
var region = o.query.results.keywords.region;
var out = '
You searched for '+term+' in '+ language +'
'+
'We found these related keywords:
'+
''+kw.replace(/,/g,', ')+'
';
$('keywords').set('html',out);
} else {
$('keywords').set('text','There was an error, please try again.');
}
},
onRequest: function(script) {
if(window.console) {console.log(script);}
$('keywords').set('text','Loading...');
}
}).send();
$('another_keywords').loadKeywords('python');
}
In your HTML source:
#HTML
Dependencies
MooTools Core 1.3.0
MooTools More: Request.JSONP
Notes:
You can view in action:
- [http://thinkphp.ro/apps/js-hacks/Request.Keywords/demo1.html](http://thinkphp.ro/apps/js-hacks/Request.Keywords/demo1.html)
- [http://thinkphp.ro/apps/js-hacks/Request.Keywords/demo2.html](http://thinkphp.ro/apps/js-hacks/Request.Keywords/demo2.html)
- [http://thinkphp.ro/apps/js-hacks/Request.Keywords/demo3.html](http://thinkphp.ro/apps/js-hacks/Request.Keywords/demo3.html)
- [http://thinkphp.ro/apps/js-hacks/Request.Keywords/demo4.html](http://thinkphp.ro/apps/js-hacks/Request.Keywords/demo4.html)