Skip to content

Instantly share code, notes, and snippets.

View ginader's full-sized avatar

Dirk Ginader ginader

View GitHub Profile
@ginader
ginader / deepQuerySelectorAll.js
Created March 31, 2023 12:51 — forked from Haprog/deepQuerySelectorAll.js
A version of querySelectorAll() that also recursively looks into all shadow roots
/**
* A version of querySelectorAll() that also recursively looks into all shadow roots.
* @param selector Selector
* @param root (Optional) Scope of the query (Element or Document). Defaults to the document.
* @returns
*/
function deepQuerySelectorAll(selector, root) {
root = root || document;
const results = Array.from(root.querySelectorAll(selector));
const pushNestedResults = function (root) {
@ginader
ginader / github-pull.js
Created August 28, 2012 03:43 — forked from botic/github-pull.js
Github pull request server
include("ringo/subprocess");
var log = require("ringo/logging").getLogger(module.id);
exports.app = function(req) {
log.info("Incoming request.");
if (req.method !== "POST") {
log.info("Not a valid POST request.");