Skip to content

Instantly share code, notes, and snippets.

View patrickkon's full-sized avatar
🎯
Focusing

Patrick Tser Jern Kon patrickkon

🎯
Focusing
  • Houston, TX, USA
View GitHub Profile
@patrickkon
patrickkon / proxy.pac
Last active July 18, 2022 05:55
proxy.pac
var FindProxyForURL = function(init, profiles) {
return function(url, host) {
"use strict";
var result = init, scheme = url.substr(0, url.indexOf(":"));
do {
result = profiles[result];
if (typeof result === "function") result = result(url, host, scheme);
} while (typeof result !== "string" || result.charCodeAt(0) === 43);
return result;
};