Skip to content

Instantly share code, notes, and snippets.

View dbrewitz's full-sized avatar

David Brewitz dbrewitz

View GitHub Profile
@dbrewitz
dbrewitz / clickupTotals.js
Last active January 21, 2020 01:32
Add total estimated hours, actual hours, and difference in ClickUp
// Client side script to add total estimated hours, actual hours, and difference in ClickUp.com list views
// Use with Custom JS for websites: https://chrome.google.com/webstore/detail/custom-javascript-for-web/ddbjnfjiigjmcpcpkmhogomapikjbjdk?hl=en
function addElement() {
let el = document.querySelector('.lv-body');
if (el) {
elChild = document.createElement('div');
elChild.className = 'totalTime';
elChild.style.textAlign = 'center';
elChild.style.fontWeight = 700;
@dbrewitz
dbrewitz / keybase.md
Created December 6, 2017 03:35
keybase verification

Keybase proof

I hereby claim:

  • I am dbrewitz on github.
  • I am dbrewitz (https://keybase.io/dbrewitz) on keybase.
  • I have a public key ASAeNe0cJVrYGI3iYuSJOk0uco-4cobMCGjGrjNxgHuVOAo

To claim this, I am signing this object:

@dbrewitz
dbrewitz / SharePoint Navigation
Last active October 20, 2017 17:22
Hides Left Navigation by default in SharePoint
CSS and JS to Retract Navigation in SharePoint 2013
@dbrewitz
dbrewitz / zohoProjectUpdate.js
Last active June 7, 2017 16:28
Update statuses of Zoho Projects with JS
// These functions could be combined into one edit at a time.
// Set all Zoho projects from null to medium in custom "County Priority" field
function ZohoProjectStatusUpdate() {
var ele = document.querySelectorAll('.dropDownMenu .pointer[onclick*="ajaxShowPag"]')
for (var i = ele.length; i >= 0; i--) {
(function (index) {
setTimeout(function () {
ele[index].click()
changeItup(index)
@dbrewitz
dbrewitz / inject script or style element
Created November 29, 2016 19:34
add a script or link element to the head of a html page using javascript
// a script to add a script link or css link to the head of a html page
function addMyLink(element, url, type, rel, id) {
var head = document.getElementsByTagName('head')[0]
var myLink = document.createElement(element)
if (element === 'script') {
myLink.src = url
} else if (element === 'link') {
myLink.href = url
if(rel){myLink.rel = rel}
}
@dbrewitz
dbrewitz / GA-UA-Event.js
Last active February 27, 2019 19:39
Google Analytics event tracking
// Universal Analytics events that include common element attributes
var gaPush = {
p: function (element, cat, action, type) {
var el = document.querySelectorAll(element)
for (var i = 0; i < el.length; i++) {
el[i].addEventListener('click', function () {
var attr = {
title: eval('this.title'),
alt: eval('this.alt'),
value: eval('this.value'),