DonationCoder.com Software > Find And Run Robot
Interfacing FARR with QUIX?
(1/1)
mouser:
Lifehacker wrote a story today about Quix, which is a browser bookmarklet that you install in your browser and can then send commandline-like commands to.
http://quixapp.com/
It's reminiscent of http://yubnub.org/ but works inside the client browser rather than over the web.
Anyway, i was wondering if any of the FARR JS gurus can think of a way to maybe let farr send quix commands to the active browser -- might offer a neat way to use it.
ewemoa:
For interested parties, below is an expanded version of the bookmarklet:
--- Code: Javascript ---javascript:Quix();function Quix() { var e = encodeURIComponent; var t = window.getSelection ? window.getSelection() : (document.getSelection ? document.getSelection() : (document.selection ? document.selection.createRange().text : '')); var c = window.prompt('Quix: Type `help` for a list of commands:'); if (t != '') { if (c) { c += ' ' + t; } else { c = '' + t; } } if (c) { var u = 'http://quixapp.com/go/?c=' + e(c) + '&t=' + (document.title ? e(document.title) : '') + '&s=' + '&v=080' + '&u=' + (document.location ? e(document.location) : ''); d = '' + document.location; if (d.substr(0, 4) != 'http') { window.location = u + '&mode=direct'; } else { heads = document.getElementsByTagName('head'); if (c.substring(0, 1) == ' ') { var w = window.open(u + '&mode=direct'); w.focus(); } else if (heads.length == 0) { window.location = u + '&mode=direct'; } else { q = document.getElementById('quix'); if (q) { q.parentNode.removeChild(q); } sc = document.createElement('script'); sc.src = u; sc.id = 'quix'; sc.type = 'text/javascript'; void(heads[0].appendChild(sc)); } } }}
nitrix-ud:
that would be pretty cool :-*
ewemoa:
So far, my understanding of Quix is that a fair bit (nearly all?) of the built-in functionality ends up in communication with quixapp.com. Evidence for this includes:
* Examination of the quixapp bookmarklet source
* Wireshark monitoring
* Testing w/ my network cable unplugged
Lines that look relevant in the source include:
* window.location = u + '&mode=direct';
* var w = window.open(u + '&mode=direct');
* window.location = u + '&mode=direct';
* void(heads[0].appendChild(sc));
IIUC, each of these is at or near an "exit point" of the code.
The first three of the four lines mentioned above use "u" directly. I think "u" starts w/ 'http://quixapp.com/go/?c=' and is only subsequently appended to.
The fourth of the four lines uses "sc", which incorporates "u" via:
sc.src = u
If anyone else reads the code differently or thinks I've left out something important, please share :)
Navigation
[0] Message Index
Go to full version