Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple JS console for Firefox
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
xqjs
README.md
xpi.py

README.md

xqjs

is a simple JavaScript console for Firefox that:

  • executes JS (like Execute JS) under target window you choose (in DOMi style).
  • can preprocess code with:
    • Macro written in JS which can be either:
      • an object of regexp:replacement pairs (see default setting).
      • a function that performs arbitrary string conversion.
    • Coco.
  • has minimal capabilities of history conservation, word completion and key customization.

usage

invocation

  • Alt+(Shift)+X (default)
    • Holding Shift targets the current content instead of the browser chrome.
  • Tools -> xqjs
  • chrome://xqjs/content

execution

  • this holds various predefined utilities.
  • __ keeps previous results. _ equals __[0].

default macros

#(x) //=> f(x,y,z)(x)

#'#se.le[ct=or]'
//=> document.querySelector('#se.le[ct=or]')
#a'#se.le[ct=or]'
//=> Array.slice(document.querySelectorAll('#se.le[ct=or]'))
#x'//x:p[@th]'
//=> this.xpath('//x:p[@th]',1)
#X'//x:p[@th]'
//=> this.xpath('//x:p[@th]',0)
#z'zen+code'
//=> this.dom(this.zen('zen+code'))

p(#<<END)
  here
  document
END
/*=>
p(String(<![CDATA[  here
  document]]>))
*/
Something went wrong with that request. Please try again.