Skip to content

Instantly share code, notes, and snippets.

View ahall-medullan's full-sized avatar

Andrew Hall ahall-medullan

  • Medullan
  • Kingston, Jamaica
View GitHub Profile
var
styleSheets = document.styleSheets,
totalStyleSheets = styleSheets.length;
for (var j = 0; j < totalStyleSheets; j++){
var
styleSheet = styleSheets[j],
rules = styleSheet.cssRules,
totalRulesInStylesheet = rules.length,
totalSelectorsInStylesheet = 0;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<span id="x"></span>
<script id="jsbin-javascript">
// sometimes you just want to know when a variable changed
@ahall-medullan
ahall-medullan / main.js
Last active August 29, 2015 14:15 — forked from mhawksey/main.js
// instead of var results = YouTubeAnalytics.Reports.query(ids, start-date, end-date, metrics, optionalArgs);
var params = {"method" : "post",
"payload" : {'ids' : query.ids,
"startDate" : startDate,
"endDate": endDate,
"metrics": query.metrics,
"options": JSON.stringify(options)
}
};
var yt_data = UrlFetchApp.fetch("https://script.google.com/macros/s/YOUR_APP_ID/exec", params);