Skip to content

Instantly share code, notes, and snippets.

View adamhavel's full-sized avatar
🐙

Adam Havel adamhavel

🐙
View GitHub Profile
var scope = angular.element('[ng-switch="gridView"]').scope();
var delButton = document.body.querySelector('#contentAction_delete_myx');
var okButton;
function deleteItems() {
for (var i = 0; i < 10; i++) {
scope.onSelect(i);
};
scope.$apply();
delButton.click();
@adamhavel
adamhavel / loadFile
Last active September 7, 2024 15:02
(function() {
'use strict';
function getType(src) {
return src.match(/\.([^\.\?]+)(?:\?.*)?$/)[1];
}
function injectContent(content, type) {
if (type === 'css') {
var style = document.createElement('style');