Skip to content

Instantly share code, notes, and snippets.

View AVTPJ's full-sized avatar

PJ Palomaki AVTPJ

  • AVT Ltd
  • Brighton, UK
View GitHub Profile
@AVTPJ
AVTPJ / ClickStream.js
Created March 16, 2022 17:39 — forked from daleyjem/ClickStream.js
A Veeva ClickStream helper class for page and event tracking. *Requires veeva-library.js
/**
* Veeva ClickStream tracking class.
*
* Author: Jeremy Daley
* Liscence: MIT
*/
ClickStream.prototype.virtualInterval = -1;
ClickStream.prototype.calls = []; // Queued calls
ClickStream.prototype.debug = false;
@AVTPJ
AVTPJ / clickstream.js
Created March 16, 2022 17:39 — forked from michaeldegli/clickstream.js
Tracking time on slide with Veeva Clickstream object using JavaScript
//First thing: get the product SFID
function prod_callback(result) {
prod_id_array.push(result);
}
com.veeva.clm.getDataForCurrentObject("KeyMessage", "Product_vod__c", prod_callback);
function track(arr) {
@AVTPJ
AVTPJ / GetMiroProjectUrl.js
Last active February 14, 2023 13:55
Direct link (URL) to the currently open Miro project page. Print into developer tools.
// Copy/paste the code to the developer console, when on a Miro project page
// Thanks to - https://gist.github.com/valioDOTch/51b875732bfe02b39d340e5e8ad364cd
dashboardData = JSON.parse(localStorage["rtb_saved_dashboard"]).tree.dashboard;
console.log("https://miro.com/app/dashboard/?spaceId="+dashboardData.currentSpaceId+"&projectId="+dashboardData.currentProject.id);
@AVTPJ
AVTPJ / Miro-Share-Project-Bookmarklet.js
Created February 14, 2023 13:56 — forked from valioDOTch/Miro-Share-Project-Bookmarklet.js
Miro share project board bookmarklet
/*
* Code for a bookmarklet to get a shareable link to Miro project
*
* installation: use the URL of this Gist on https://www.yourjs.com/bookmarklet/ to add a Bookmarklet to your browser bar.
*
* usage: click on the bookmarklet, after opening up a Miro project.
* it will add a link icon (🔗) on the right hand side of the project title (next to the ➕ plus icon)
* When you click on the link, a dialog appears that provides you with a URL to share in chats or emails.
* Be aware that this might break.
*
@AVTPJ
AVTPJ / subtitle.vtt
Created February 15, 2023 15:14
VTT Subtitle test file
WEBVTT
1
00:00:00.000 --> 00:00:02.043
Hey everyone! Today I want to share
2
00:00:02.043 --> 00:00:04.421
The Opti-Nail Fungal Nail Repair Pen.
@AVTPJ
AVTPJ / vtt-styling-test.vtt
Created February 21, 2023 13:30
VTT in-file styling test
WEBVTT
NOTE From https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#within_the_webvtt_file_itself
STYLE
::cue {
background-image: linear-gradient(to bottom, dimgray, lightgray);
color: papayawhip;
}
/* Style blocks cannot use blank lines nor "dash dash greater than" */
// The events are from https://www.w3.org/TR/html5/semantics-embedded-content.html#media-elements-event-summary
import videojs from 'video.js'
const Plugin = videojs.getPlugin('plugin')
const EVENTS = [
'loadstart',
'progress',
'suspend',
'abort',
'error',