This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#jsonrpc.py from https://github.com/JoinMarket-Org/joinmarket/blob/master/joinmarket/jsonrpc.py | |
#copyright # Copyright (C) 2013,2015 by Daniel Kraft <d@domob.eu> and phelix / blockchained.com | |
import base64 | |
import httplib | |
import json | |
class JsonRpcError(Exception): | |
def __init__(self, obj): | |
self.message = obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// delete console.log | |
querySelectorAttempt._timerIDs = [] | |
function querySelectorAttempt(selectors, callback, _attempts){ | |
if (!Array.isArray(selectors)) selectors = selectors.toString().split(/\s*,\s*/) | |
console.log('querySelectorAttempt', selectors, _attempts) | |
if (_attempts == null) _attempts = 20; | |
var elements | |
selectors.forEach(function(selector){ | |
if (elements && elements.length > 0) return; | |
elements = document.querySelectorAll(selector); |