This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove loading screen from Google Optimize | |
// @version 0.1 | |
// @description Script to remove the annoying loading screen... | |
// @author @simondahla | |
// @match https://optimize.google.com/optimize/home/ | |
// ==/UserScript== | |
(function() { | |
var element = document.getElementsByClassName('opt-busy-dialog') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logTimes(message) { | |
if (window.performance) { | |
performance.mark(message); // this one is for WebPageTest | |
console.timeStamp(message); // this is for the Performance tab in Chrome DevTools | |
console.info(message, performance.now()); // this is for the console, duh | |
// this here is for Google Analytics | |
ga('send', { | |
hitType: 'timing', | |
timingCategory: 'Performance', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onEdit() { | |
var doc, footer, style = {}; | |
// Define a custom paragraph style. | |
style[DocumentApp.Attribute.HORIZONTAL_ALIGNMENT] = DocumentApp.HorizontalAlignment.RIGHT; | |
style[DocumentApp.Attribute.FONT_FAMILY] = 'Proxima Nova'; | |
style[DocumentApp.Attribute.FONT_SIZE] = 6; | |
style[DocumentApp.Attribute.BOLD] = false; | |
style[DocumentApp.Attribute.ITALIC] = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Function adds style element to the bottom of the head element of the page | |
* @param {string} code Any string of css code | |
* @return {undefined} | |
*/ | |
function insertCssToHead( code ) { | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
if (style.styleSheet) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- 0. UTF-8 encoding --> | |
<meta charset="utf-8"> | |
<!-- 1. (OPTIONAL) Move jQuery here. --> | |
<!-- 2. (OPTIONAL) Datalayer --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
var vwoExp = null; | |
if (typeof _vwo_exp !== 'undefined') { | |
vwoExp = []; | |
for (keys in _vwo_exp) { | |
(typeof _vwo_exp[keys]['combination_chosen'] !== 'undefined' ? vwoExp.push(keys + ':' + _vwo_exp[keys]['combination_chosen']) : ''); | |
} | |
(vwoExp.length > 0 ? vwoExp = '|' + vwoExp.join('|') + '|' : vwoExp = null); | |
} | |
return vwoExp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function() { | |
'use strict'; | |
var o = window.optimizely; | |
window.optimizely = window.optimizely || []; | |
window.dataLayer = window.dataLayer || []; | |
if (o.activeExperiments && o.allExperiments) { | |
for (var i = 0; i < o.activeExperiments.length; i++) { | |
var experimentId = o.data.state.activeExperiments[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
if (window.optimizely) { | |
var o = optimizely; | |
if (o.activeExperiments && o.allExperiments) { | |
for (var i = 0; i < o.activeExperiments.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function() { | |
var d = false; | |
window.optimizely = window.optimizely || []; | |
var o = window.optimizely; | |
if (o.activeExperiments && o.allExperiments) { | |
for (var i = 0; i < o.activeExperiments.length; i++) { | |
var experimentId = o.data.state.activeExperiments[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var d = false; | |
window.optimizely = window.optimizely || []; | |
var o = window.optimizely; | |
if (o.activeExperiments && o.allExperiments) { | |
for (var i = 0; i < o.activeExperiments.length; i++) { | |
var experimentId = o.data.state.activeExperiments[i]; | |
var experimentName = experimentId; |
NewerOlder