macheteYeti / LWAF 14 Day Convert

// ==UserScript==
// @name         LWAF 14 Day Convert
// @namespace    SUD
// @license MIT
// @include https://app.convert.com/accounts/10041818/projects/10042140/experiences/*
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @require     https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.min.js
// @downloadURL https://openuserjs.org/install/macheteYeti/LWAF_14_Day_Convert.user.js
// @updateURL https://openuserjs.org/install/macheteYeti/LWAF_14_Day_Convert.user.js
// @version 1
// @grant GM_addStyle
// @author       macheteYeti
// @license MIT
// @description  Adds functionality to automatically select "last 14 days" on Convert Reports
// ==/UserScript==

$(document).ready(function(){

	if(window.location.href.indexOf('report')>-1){
	
		setTimeout(()=>{
		
			$('[data-testid="date-range-picker"]').last().find('button').last()[0].click();
			setTimeout(()=>{
			
				console.log('found');
				$('button[value="last14"]').trigger('click');
				setTimeout(()=>{
				
					$('.css-1xa9g2d button').last()[0].click();
				},500);
			},1000);
		},3500);
	}
});

GM_addStyle( `
   
` );