Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Ameeta-Prakash authored May 7, 2024
1 parent 412637b commit faea805
Show file tree
Hide file tree
Showing 74 changed files with 2,071 additions and 1 deletion.
126 changes: 126 additions & 0 deletions assets/pm9yEBG_pnaAyi7L/analytics-frame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="referrer" content="origin" />
<script>
/* jshint ignore:start */
// jscs:disable
// https://gist.github.com/982883
var uuid = function(a) {
return a // if the placeholder was passed, return
? ( // a random number from 0 to 15
a ^ // unless b is 8,
Math.random() // in which case
* 16 // a random number from
>> a/4 // 8 to 11
).toString(16) // in hexadecimal
: ( // or otherwise a concatenated string:
[1e7] + // 10000000 +
-1e3 + // -1000 +
-4e3 + // -4000 +
-8e3 + // -80000000 +
-1e11 // -100000000000,
).replace( // replacing
/[018]/g, // zeroes, ones, and eights with
uuid // random hex digits
);
};

window.frameHash = window.location.hash.replace(/^#/, '');

var postToParent = function(message) {
if (window.parent.postMessage != null) {
window.parent.postMessage(message, '*');
}
};

var onDidReceiveMessage = function(e) {
if (e.data.id === frameHash) {
var xhr = new XMLHttpRequest(),
now = new Date(),
data = {
messageId: uuid(),
sentAt: now.toISOString(),
batch: [ {
event: e.data.event,
properties: e.data.properties,
type: 'track',
messageId: uuid(),
timestamp: now.toISOString(),
context: {
ip: '0.0.0.0',
page: {
path: '/',
referrer: '',
search: '',
title: '',
url: 'http://'
}
},
integrations: {},
userId: e.data.aid
} ]
};

xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
postToParent({
id: frameHash,
message: 'xhr sent'
});
window.onDidReceiveMessage = null;
}
};

xhr.open('POST', 'https://metrics.articulate.com/v1/import');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify(data));
}
};

if ('onmessage' in window) {
window.addEventListener('message', onDidReceiveMessage, false);
} else {
// coming from flash, we will use older JS since we can expect some older IE versions
var validProps = [
'os', 'browser', 'playerVersion', 'playerType', 'lmsPresent', 'tinCanPresent',
'aoSupport', 'publishSource', 'protocol', 'productChannel', 'cid', 'screenResolution',
'pixelRatio'
];
var aid,
props = window.location.search.replace(/^\?/, '').split('&'),
config = {};

for (var i = 0, ii = props.length, currProp; i < ii; i++) {
currProp = props[i].split('=');
if (validProps.indexOf(currProp[0]) > -1 && currProp.length === 2) {
config[currProp[0]] = currProp[1];
} else if (currProp[0] === 'aid') {
aid = currProp[1];
}
}

window.onDidReceiveMessage({
data: {
id: frameHash,
event: 'player_course_load',
properties: config,
aid: aid
}
})

}
/* jshint ignore:end */
// jscs:enable
</script>
</head>
<body>
</body>
<script>
postToParent({
id: window.frameHash,
message: 'loaded'
});
</script>
</html>
807 changes: 807 additions & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/css/output.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/5cPcIPkG7RS.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/5hgSka807Yk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/5oyDuFzPrX7.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/5w7dSwlQziv.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/5wEo0T9RRV0.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/5xR0GYdDjlY.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/5yoPrUIVcMR.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/61Jkgl8A6pF.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/61sWqueu0CN.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/67LFJEPW0J8.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/6A00ZJr0Rci.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/6KCbb88D1zc.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/6cKqcG6cj14.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/6ju5k7I8VDy.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/data.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/frame.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/data/js/paths.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/lib/hls/hls.min.js

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/lib/scripts/bootstrapper.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/lib/scripts/frame.mobile.min.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions assets/pm9yEBG_pnaAyi7L/html5/lib/scripts/slides.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pm9yEBG_pnaAyi7L/meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><meta xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><project id="6DwFbYCM9o7" courseid="6UQyNk6gytz" thumburl="story_content/thumbnail.jpg" title="Formatting-thesis" datepublished="2024-05-07T21:51:44" version="1.0.0.0" flashdata="story_content/data.swf" html5data="mobile/data.json" mobiledata="mobile/data.gz" enabledownload="false" duration="About 1 minute" totalaudio="0" totalvideo="0"><description /><keywords /><slidemeta moniker="slide" monikerplural="slides" viewslides="14" slidecountdescription="14 slides" /><author name="Ameeta Prakash" email="" website="" /><application name="Articulate Storyline" version="3.78.30747.0" xmlversion="4.0" /></project></meta>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/5cOQ8lclju6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/5eQbmm7sUr5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/5inJ4Pvq56y.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/5pbMicUzFs6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/5ps5uQkpV19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/5xWhPHT9YeI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/6ADoD7cahb0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/6G0Woiy4zGS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/6KVti3XYJDT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/6LRhQYj2k5y.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/6ScH4ppaySV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/6SiCt4Cdh9a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/6aRT3VNJFQV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pm9yEBG_pnaAyi7L/mobile/6duXdjqz3CC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
261 changes: 261 additions & 0 deletions assets/pm9yEBG_pnaAyi7L/player-interface.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
(function () {
function getParams(url) {
const querystring = url.split('?')[1]
if (!querystring) {
return {}
}

return querystring.split('&').reduce(function (memo, param) {
const tuple = param.split('=', 2)
memo[tuple[0]] = decodeURIComponent(tuple[1].replace(/\+/g, ' '))

return memo
}, {})
}

function buildFlashVars(params) {
const flashParams = {
vEnableOne: 'true',
vInterfaceObject: 'vInterfaceObject',
vRestoreStateData: params.state
}

return Object.keys(flashParams).reduce(function (memo, key) {
if (flashParams[key]) {
memo.push(key.concat('=', flashParams[key]))
}

return memo
}, []).join('&')
}

const params = getParams(window.location.href)
const debug = !!params.debug

const handlers = {
'frame:loaded': frameLoaded,
'slide:capture': captureSlide,
'player:pause': triggerPause,
'player:play': triggerPlay,
'player:focus': focusPlayer,
'preview:navigate': jumpToContext,
'preview:changeset': livePreview
}

if (Object.prototype.hasOwnProperty.call(params, 'wmode')) {
window.g_strWMode = params['wmode']
}

window.autoSpider = true
window.g_strFlashVars = buildFlashVars(params)
window.vEnableOne = true
window.addEventListener('message', handleMessage)

window.vRestoreStateData = params.state

window.vInterfaceObject = {
isRise: !!params.rise,
OnSlideStarted: function (id) {
sendParentMessage({
type: 'slide:change',
data: id
})
},
OnSlideTransition: function (id, duration) {
sendParentMessage({
type: 'slide:transition',
data: {
id: id,
duration: duration
}
})
},
OnPlayButtonShown: function () {
sendParentMessage({
type: 'playButton:shown'
})
},
OnEnterFullscreen: function () {
sendParentMessage({
type: 'fullscreen:enter',
windowName: window.name
})
},
OnExitFullscreen: function () {
sendParentMessage({
type: 'fullscreen:exit',
windowName: window.name
})
},
OnPlayerClicked: function () {
sendParentMessage({
type: 'player:click'
})
},
LmsUpdate: function (data) {
sendParentMessage({
type: 'course:update',
payload: data,
windowName: window.name
})
}
}

let playerTimeupdateWaiting = false

function throttledPlayerTimeupdate() {
if (!playerTimeupdateWaiting) {
playerTimeupdateWaiting = true

sendParentMessage({
type: 'player:timeupdate'
})

setTimeout(() => {
playerTimeupdateWaiting = false
}, 2000)
}
}

function frameLoaded() {
const videoNodes = document.querySelectorAll('video')

videoNodes.forEach(video =>
video.addEventListener('timeupdate', throttledPlayerTimeupdate)
)
}

function captureSlide(data) {
const player = window.GetPlayer()
if (typeof player.CaptureSlideImage !== 'function') {
log('player-interface.js: player.CaptureSlideImage is not a function! returning early')

return
}
sendParentMessage({
type: 'slide:capture',
data: {
commentId: data.commentId,
snapshot: player.CaptureSlideImage()
}
})
}

function triggerPause() {
const player = window.GetPlayer()
if (typeof player.TriggerPause !== 'function') {
log('player-interface.js: player.TriggerPause is not a function! returning early')

return
}
player.TriggerPause()
}

function jumpToContext(data) {
const player = window.GetPlayer()
if (typeof player.JumpToLocation !== 'function') {
log('player-interface.js: player.JumpToLocation is not a function! returning early')

return
}
player.JumpToLocation(data.path)
}

function triggerPlay() {
const player = window.GetPlayer()
if (typeof player.TriggerPlay !== 'function') {
log('player-interface.js: player.TriggerPlay is not a function! returning early')

return
}
player.TriggerPlay()
}

function focusPlayer() {
window.focus()
}

function livePreview(data) {
const player = window.GetPlayer()
if (typeof player.UpdateSegmentPartText !== 'function') {
log('player-interface.js: player.UpdateSegmentPartText is not a function! returning early')

return
}
data.forEach(change => {
if (change?.updatedXlifTarget) {
return player.UpdateSegmentPartText(change?.path[1], change?.updatedXlifTarget)
}

player.UpdateTextLibItem(change?.path, change?.updatedTarget)
})
}

function handleMessage(e) {
const event = e.data
log('player-interface.js: received post message from parent window', event)
if (typeof event !== 'object') {
return
}
const handler = handlers[event.type]
if (!handler) {
return
}
try {
handler(event.data)
} catch (err) {
log('player-interface.js: error executing ' + event.type + ' message handler', err)
window.playerInterfaceError = err
sendParentMessage({
type: 'error',
data: {
eventType: event.type,
eventData: event.data,
errorJson: stringifyError(err),
playerVersion: (window.globals && window.globals.playerVersion) || 'unknown'
}
})
}
}

function sendParentMessage(message) {
log('player-interface.js: sending post message to parent window', message)
window.parent.postMessage(message, '*')
}

function log(...args) {
if (!debug) {
return
}
console.log(args)
}

function stringifyError(err) {
const jsonify = function (obj) {
return JSON.stringify(obj, Object.getOwnPropertyNames(obj))
}

const safeToString = function (obj, fallback) {
return typeof obj.toString === 'function' ? obj.toString() || fallback : fallback
}

let json = jsonify(err)

if (json !== '{}') {
const rehydrated = JSON.parse(json)

if (!rehydrated.message) {
rehydrated.message = err.message || safeToString(err, '[failed to obtain error message]')
json = jsonify(rehydrated)
}

return json
}

const pseudoError = {
message: safeToString(err, '[unable to convert error to json/string]')
}

return jsonify(pseudoError)
}
})()
Loading

0 comments on commit faea805

Please sign in to comment.