Skip to content

Instantly share code, notes, and snippets.

View doubleface's full-sized avatar

Thiriot Christophe doubleface

  • Cozy Cloud
  • Gambais, France
View GitHub Profile
@Offirmo
Offirmo / intercept.js
Last active January 16, 2025 00:40
[DOM -- fetch / XHR -- interception] #JavaScript #browser #growth
/////// fetch ///////
const originalFetch = window.fetch;
window.fetch = async (...args) => {
const fetchee = await originalFetch(...args);
return new Proxy(fetchee, {});
};
new Proxy(target, {
var AmpersandCollection = require('ampersand-collection'),
_ = require('underscore'),
AmpersandRestCollection = _.clone(require('ampersand-collection-rest-mixin')),
sync = require('./sync'),
Search = require('./search'),
EJSON = require('mongodb-extended-json'),
AmpersandModel = require('ampersand-model');
var MongoDBCollection = AmpersandCollection.extend(AmpersandRestCollection, {
fetched: false,
@maccman
maccman / jquery.ajax.queue.coffee
Last active January 13, 2018 12:03
Queueing jQuery Ajax requests. Usage $.ajax({queue: true})
$ = jQuery
queues = {}
running = false
queue = (name) ->
name = 'default' if name is true
queues[name] or= []
next = (name) ->