add reference link to read
parent
314e176462
commit
f9b1f928d8
|
@ -2,8 +2,11 @@
|
|||
bin/*
|
||||
doc/*
|
||||
busybox/*
|
||||
|
||||
# Except this file
|
||||
!.gitkeep
|
||||
!doc/Creating_containers-Part_1.html
|
||||
!doc/Creating containers - Part 1_files/
|
||||
|
||||
*.o
|
||||
|
||||
|
|
|
@ -0,0 +1,423 @@
|
|||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0
|
||||
/* eslint-disable no-var, semi, prefer-arrow-callback, prefer-template */
|
||||
|
||||
/**
|
||||
* Collection of methods for sending analytics events to Archive.org's analytics server.
|
||||
*
|
||||
* These events are used for internal stats and sent (in anonymized form) to Google Analytics.
|
||||
*
|
||||
* @see analytics.md
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
window.archive_analytics = (function defineArchiveAnalytics() {
|
||||
// keep orignal Date object so as not to be affected by wayback's
|
||||
// hijacking global Date object
|
||||
var Date = window.Date;
|
||||
var ARCHIVE_ANALYTICS_VERSION = 2;
|
||||
var DEFAULT_SERVICE = 'ao_2';
|
||||
|
||||
var startTime = new Date();
|
||||
|
||||
/**
|
||||
* @return {Boolean}
|
||||
*/
|
||||
function isPerformanceTimingApiSupported() {
|
||||
return 'performance' in window && 'timing' in window.performance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines how many milliseconds elapsed between the browser starting to parse the DOM and
|
||||
* the current time.
|
||||
*
|
||||
* Uses the Performance API or a fallback value if it's not available.
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Performance_API
|
||||
*
|
||||
* @return {Number}
|
||||
*/
|
||||
function getLoadTime() {
|
||||
var start;
|
||||
|
||||
if (isPerformanceTimingApiSupported())
|
||||
start = window.performance.timing.domLoading;
|
||||
else
|
||||
start = startTime.getTime();
|
||||
|
||||
return new Date().getTime() - start;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines how many milliseconds elapsed between the user navigating to the page and
|
||||
* the current time.
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Performance_API
|
||||
*
|
||||
* @return {Number|null} null if the browser doesn't support the Performance API
|
||||
*/
|
||||
function getNavToDoneTime() {
|
||||
if (!isPerformanceTimingApiSupported())
|
||||
return null;
|
||||
|
||||
return new Date().getTime() - window.performance.timing.navigationStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs an arithmetic calculation on a string with a number and unit, while maintaining
|
||||
* the unit.
|
||||
*
|
||||
* @param {String} original value to modify, with a unit
|
||||
* @param {Function} doOperation accepts one Number parameter, returns a Number
|
||||
* @returns {String}
|
||||
*/
|
||||
function computeWithUnit(original, doOperation) {
|
||||
var number = parseFloat(original, 10);
|
||||
var unit = original.replace(/(\d*\.\d+)|\d+/, '');
|
||||
|
||||
return doOperation(number) + unit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the default font size of the browser.
|
||||
*
|
||||
* @returns {String|null} computed font-size with units (typically pixels), null if it cannot be computed
|
||||
*/
|
||||
function getDefaultFontSize() {
|
||||
var fontSizeStr;
|
||||
|
||||
if (!('getComputedStyle' in window))
|
||||
return null;
|
||||
|
||||
var style = window.getComputedStyle(document.documentElement);
|
||||
if (!style)
|
||||
return null;
|
||||
|
||||
fontSizeStr = style.fontSize;
|
||||
|
||||
// Don't modify the value if tracking book reader.
|
||||
if (document.documentElement.classList.contains('BookReaderRoot'))
|
||||
return fontSizeStr;
|
||||
|
||||
return computeWithUnit(fontSizeStr, function reverseBootstrapFontSize(number) {
|
||||
// Undo the 62.5% size applied in the Bootstrap CSS.
|
||||
return number * 1.6;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the URL parameters for a given Location
|
||||
* @param {Location}
|
||||
* @return {Object} The URL parameters
|
||||
*/
|
||||
function getParams(location) {
|
||||
if (!location) location = window.location;
|
||||
var vars;
|
||||
var i;
|
||||
var pair;
|
||||
var params = {};
|
||||
var query = location.search;
|
||||
if (!query) return params;
|
||||
vars = query.substring(1).split('&');
|
||||
for (i = 0; i < vars.length; i++) {
|
||||
pair = vars[i].split('=');
|
||||
params[pair[0]] = decodeURIComponent(pair[1]);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* @type {String|null}
|
||||
*/
|
||||
service: null,
|
||||
|
||||
/**
|
||||
* Key-value pairs to send in pageviews (you can read this after a pageview to see what was
|
||||
* sent).
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
values: {},
|
||||
|
||||
/**
|
||||
* Sends an analytics ping, preferably using navigator.sendBeacon()
|
||||
* @param {Object} values
|
||||
* @param {Function} [onload_callback] (deprecated) callback to invoke once ping to analytics server is done
|
||||
* @param {Boolean} [augment_for_ao_site] (deprecated) if true, add some archive.org site-specific values
|
||||
*/
|
||||
send_ping: function send_ping(values, onload_callback, augment_for_ao_site) {
|
||||
if (typeof window.navigator !== 'undefined' && typeof window.navigator.sendBeacon !== 'undefined')
|
||||
this.send_ping_via_beacon(values);
|
||||
else
|
||||
this.send_ping_via_image(values);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sends a ping via Beacon API
|
||||
* NOTE: Assumes window.navigator.sendBeacon exists
|
||||
* @param {Object} values Tracking parameters to pass
|
||||
*/
|
||||
send_ping_via_beacon: function send_ping_via_beacon(values) {
|
||||
var url = this.generate_tracking_url(values || {});
|
||||
window.navigator.sendBeacon(url);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sends a ping via Image object
|
||||
* @param {Object} values Tracking parameters to pass
|
||||
*/
|
||||
send_ping_via_image: function send_ping_via_image(values) {
|
||||
var url = this.generate_tracking_url(values || {});
|
||||
var loadtime_img = new Image(1, 1);
|
||||
loadtime_img.src = url;
|
||||
},
|
||||
|
||||
/**
|
||||
* Construct complete tracking URL containing payload
|
||||
* @param {Object} params Tracking parameters to pass
|
||||
* @return {String} URL to use for tracking call
|
||||
*/
|
||||
generate_tracking_url: function generate_tracking_url(params) {
|
||||
var baseUrl = '//analytics.archive.org/0.gif';
|
||||
var keys;
|
||||
var outputParams = params;
|
||||
var outputParamsArray = [];
|
||||
|
||||
outputParams.service = outputParams.service || this.service || DEFAULT_SERVICE;
|
||||
|
||||
// Build array of querystring parameters
|
||||
keys = Object.keys(outputParams);
|
||||
keys.forEach(function keyIteration(key) {
|
||||
outputParamsArray.push(encodeURIComponent(key) + '=' + encodeURIComponent(outputParams[key]));
|
||||
});
|
||||
outputParamsArray.push('version=' + ARCHIVE_ANALYTICS_VERSION);
|
||||
outputParamsArray.push('count=' + (keys.length + 2)); // Include `version` and `count` in count
|
||||
|
||||
return baseUrl + '?' + outputParamsArray.join('&');
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {int} page Page number
|
||||
*/
|
||||
send_scroll_fetch_event: function send_scroll_fetch_event(page) {
|
||||
var additionalValues = { ev: page };
|
||||
var loadTime = getLoadTime();
|
||||
var navToDoneTime = getNavToDoneTime();
|
||||
if (loadTime) additionalValues.loadtime = loadTime;
|
||||
if (navToDoneTime) additionalValues.nav_to_done_ms = navToDoneTime;
|
||||
this.send_event('page_action', 'scroll_fetch', location.pathname, additionalValues);
|
||||
},
|
||||
|
||||
send_scroll_fetch_base_event: function send_scroll_fetch_base_event() {
|
||||
var additionalValues = {};
|
||||
var loadTime = getLoadTime();
|
||||
var navToDoneTime = getNavToDoneTime();
|
||||
if (loadTime) additionalValues.loadtime = loadTime;
|
||||
if (navToDoneTime) additionalValues.nav_to_done_ms = navToDoneTime;
|
||||
this.send_event('page_action', 'scroll_fetch_base', location.pathname, additionalValues);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Object} [options]
|
||||
* @param {String} [options.mediaType]
|
||||
* @param {String} [options.mediaLanguage]
|
||||
* @param {String} [options.page] The path portion of the page URL
|
||||
*/
|
||||
send_pageview: function send_pageview(options) {
|
||||
var settings = options || {};
|
||||
|
||||
var defaultFontSize;
|
||||
var loadTime = getLoadTime();
|
||||
var mediaType = settings.mediaType;
|
||||
var primaryCollection = settings.primaryCollection;
|
||||
var page = settings.page;
|
||||
var navToDoneTime = getNavToDoneTime();
|
||||
|
||||
/**
|
||||
* @return {String}
|
||||
*/
|
||||
function get_locale() {
|
||||
if (navigator) {
|
||||
if (navigator.language)
|
||||
return navigator.language;
|
||||
|
||||
else if (navigator.browserLanguage)
|
||||
return navigator.browserLanguage;
|
||||
|
||||
else if (navigator.systemLanguage)
|
||||
return navigator.systemLanguage;
|
||||
|
||||
else if (navigator.userLanguage)
|
||||
return navigator.userLanguage;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
defaultFontSize = getDefaultFontSize();
|
||||
|
||||
// Set field values
|
||||
this.values.kind = 'pageview';
|
||||
this.values.timediff = (new Date().getTimezoneOffset()/60)*(-1); // *timezone* diff from UTC
|
||||
this.values.locale = get_locale();
|
||||
this.values.referrer = (document.referrer == '' ? '-' : document.referrer);
|
||||
|
||||
if (loadTime)
|
||||
this.values.loadtime = loadTime;
|
||||
|
||||
if (navToDoneTime)
|
||||
this.values.nav_to_done_ms = navToDoneTime;
|
||||
|
||||
/* START CUSTOM DIMENSIONS */
|
||||
if (defaultFontSize)
|
||||
this.values.ga_cd1 = defaultFontSize;
|
||||
|
||||
if ('devicePixelRatio' in window)
|
||||
this.values.ga_cd2 = window.devicePixelRatio;
|
||||
|
||||
if (mediaType)
|
||||
this.values.ga_cd3 = mediaType;
|
||||
|
||||
if (settings.mediaLanguage) {
|
||||
this.values.ga_cd4 = settings.mediaLanguage;
|
||||
}
|
||||
|
||||
if (primaryCollection) {
|
||||
this.values.ga_cd5 = primaryCollection;
|
||||
}
|
||||
/* END CUSTOM DIMENSIONS */
|
||||
|
||||
if (page)
|
||||
this.values.page = page;
|
||||
|
||||
this.send_ping(this.values);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sends a tracking "Event".
|
||||
* @param {string} category
|
||||
* @param {string} action
|
||||
* @param {string} label
|
||||
* @param {Object} additionalEventParams
|
||||
*/
|
||||
send_event: function send_event(
|
||||
category,
|
||||
action,
|
||||
label,
|
||||
additionalEventParams
|
||||
) {
|
||||
if (!label) label = window.location.pathname;
|
||||
if (!additionalEventParams) additionalEventParams = {};
|
||||
if (additionalEventParams.mediaLanguage) {
|
||||
additionalEventParams.ga_cd4 = additionalEventParams.mediaLanguage;
|
||||
delete additionalEventParams.mediaLanguage;
|
||||
}
|
||||
var eventParams = Object.assign(
|
||||
{
|
||||
kind: 'event',
|
||||
ec: category,
|
||||
ea: action,
|
||||
el: label,
|
||||
cache_bust: Math.random(),
|
||||
},
|
||||
additionalEventParams
|
||||
);
|
||||
this.send_ping(eventParams);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Object} options see this.send_pageview options
|
||||
*/
|
||||
send_pageview_on_load: function send_pageview_on_load(options) {
|
||||
var self = this;
|
||||
|
||||
window.addEventListener('load', function send_pageview_with_options() {
|
||||
self.send_pageview(options);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles tracking events passed in URL.
|
||||
* Assumes category and action values are separated by a "|" character.
|
||||
* NOTE: Uses the unsampled analytics property. Watch out for future high click links!
|
||||
* @param {Location}
|
||||
*/
|
||||
process_url_events: function process_url_events(location) {
|
||||
var eventValues;
|
||||
var actionValue;
|
||||
var eventValue = getParams(location).iax;
|
||||
if (!eventValue) return;
|
||||
eventValues = eventValue.split('|');
|
||||
actionValue = eventValues.length >= 1 ? eventValues[1] : '';
|
||||
this.send_event(
|
||||
eventValues[0],
|
||||
actionValue,
|
||||
window.location.pathname,
|
||||
{ service: 'ao_no_sampling' }
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Attaches handlers for event tracking.
|
||||
*
|
||||
* To enable click tracking for a link, add a `data-event-click-tracking`
|
||||
* attribute containing the Google Analytics Event Category and Action, separated
|
||||
* by a vertical pipe (|).
|
||||
* e.g. `<a href="foobar" data-event-click-tracking="TopNav|FooBar">`
|
||||
*
|
||||
* To enable form submit tracking, add a `data-event-form-tracking` attribute
|
||||
* to the `form` tag.
|
||||
* e.g. `<form data-event-form-tracking="TopNav|SearchForm" method="GET">`
|
||||
*
|
||||
* Additional tracking options can be added via a `data-event-tracking-options`
|
||||
* parameter. This parameter, if included, should be a JSON string of the parameters.
|
||||
* Valid parameters are:
|
||||
* - service {string}: Corresponds to the Google Analytics property data values flow into
|
||||
*/
|
||||
set_up_event_tracking: function set_up_event_tracking() {
|
||||
var self = this;
|
||||
var clickTrackingAttributeName = 'event-click-tracking';
|
||||
var formTrackingAttributeName = 'event-form-tracking';
|
||||
var trackingOptionsAttributeName = 'event-tracking-options';
|
||||
|
||||
function makeActionHandler(attributeName) {
|
||||
return function actionHandler(event) {
|
||||
var $currentTarget;
|
||||
var categoryAction;
|
||||
var categoryActionParts;
|
||||
var options;
|
||||
var submitFormFunction;
|
||||
$currentTarget = $(event.currentTarget);
|
||||
if (!$currentTarget) return;
|
||||
categoryAction = $currentTarget.data(attributeName);
|
||||
if (!categoryAction) return;
|
||||
categoryActionParts = categoryAction.split('|');
|
||||
options = $currentTarget.data(trackingOptionsAttributeName) || {}; // Converts to JSON
|
||||
self.send_event(
|
||||
categoryActionParts[0],
|
||||
categoryActionParts[1],
|
||||
window.location.pathname,
|
||||
options.service ? { service: options.service } : {}
|
||||
);
|
||||
};
|
||||
}
|
||||
$(document).on(
|
||||
'click',
|
||||
'[data-' + clickTrackingAttributeName + ']',
|
||||
makeActionHandler(clickTrackingAttributeName)
|
||||
);
|
||||
$(document).on(
|
||||
'submit',
|
||||
'form[data-' + formTrackingAttributeName + ']',
|
||||
makeActionHandler(formTrackingAttributeName)
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns {Object[]}
|
||||
*/
|
||||
get_data_packets: function get_data_packets() {
|
||||
return [this.values];
|
||||
},
|
||||
};
|
||||
}());
|
||||
// @license-end
|
|
@ -0,0 +1,470 @@
|
|||
@import 'record.css'; /* for SPN1 */
|
||||
|
||||
#wm-ipp-base {
|
||||
min-height:65px;
|
||||
padding:0;
|
||||
margin:0;
|
||||
border:none;
|
||||
background:none transparent;
|
||||
}
|
||||
#wm-ipp {
|
||||
z-index: 2147483640;
|
||||
}
|
||||
#wm-ipp, #wm-ipp * {
|
||||
font-family:Lucida Grande, Helvetica, Arial, sans-serif;
|
||||
font-size:12px;
|
||||
line-height:1.2;
|
||||
letter-spacing:0;
|
||||
width:auto;
|
||||
height:auto;
|
||||
max-width:none;
|
||||
max-height:none;
|
||||
min-width:0 !important;
|
||||
min-height:0;
|
||||
outline:none;
|
||||
float:none;
|
||||
text-align:left;
|
||||
border:none;
|
||||
color: #000;
|
||||
text-indent: 0;
|
||||
position: initial;
|
||||
background: none;
|
||||
}
|
||||
#wm-ipp div, #wm-ipp canvas {
|
||||
display: block;
|
||||
}
|
||||
#wm-ipp div, #wm-ipp tr, #wm-ipp td, #wm-ipp a, #wm-ipp form {
|
||||
padding:0;
|
||||
margin:0;
|
||||
border:none;
|
||||
border-radius:0;
|
||||
background-color:transparent;
|
||||
background-image:none;
|
||||
/*z-index:2147483640;*/
|
||||
height:auto;
|
||||
}
|
||||
#wm-ipp table {
|
||||
border:none;
|
||||
border-collapse:collapse;
|
||||
margin:0;
|
||||
padding:0;
|
||||
width:auto;
|
||||
font-size:inherit;
|
||||
}
|
||||
#wm-ipp form input {
|
||||
padding:1px !important;
|
||||
height:auto;
|
||||
display:inline;
|
||||
margin:0;
|
||||
color: #000;
|
||||
background: none #fff;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
#wm-ipp form input[type=submit] {
|
||||
padding:0 8px !important;
|
||||
margin:1px 0 1px 5px !important;
|
||||
width:auto !important;
|
||||
border: 1px solid #000 !important;
|
||||
background: #fff !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
#wm-ipp a {
|
||||
display: inline;
|
||||
}
|
||||
#wm-ipp a:hover{
|
||||
text-decoration:underline;
|
||||
}
|
||||
#wm-ipp a.wm-btn:hover {
|
||||
text-decoration:none;
|
||||
color:#ff0 !important;
|
||||
}
|
||||
#wm-ipp a.wm-btn:hover span {
|
||||
color:#ff0 !important;
|
||||
}
|
||||
#wm-ipp #wm-ipp-inside {
|
||||
margin: 0 6px;
|
||||
border:5px solid #000;
|
||||
border-top:none;
|
||||
background-color:rgba(255,255,255,0.9);
|
||||
-moz-box-shadow:1px 1px 4px #333;
|
||||
-webkit-box-shadow:1px 1px 4px #333;
|
||||
box-shadow:1px 1px 4px #333;
|
||||
border-radius:0 0 8px 8px;
|
||||
}
|
||||
/* selectors are intentionally verbose to ensure priority */
|
||||
#wm-ipp #wm-logo {
|
||||
padding:0 10px;
|
||||
vertical-align:middle;
|
||||
min-width:110px;
|
||||
width:15%;
|
||||
}
|
||||
#wm-ipp table tr::before, #wm-ipp table tr::after {
|
||||
margin: 0;
|
||||
height: auto;
|
||||
}
|
||||
#wm-ipp table.c {
|
||||
vertical-align:top;
|
||||
margin-left: 4px;
|
||||
}
|
||||
#wm-ipp table.c td {
|
||||
border:none !important;
|
||||
}
|
||||
#wm-ipp .c td.u {
|
||||
padding:3px 0 !important;
|
||||
text-align:center;
|
||||
}
|
||||
#wm-ipp .c td.n {
|
||||
padding:0 0 0 5px !important;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
#wm-ipp .c td.n a {
|
||||
text-decoration:none;
|
||||
color:#33f;
|
||||
font-weight:bold;
|
||||
}
|
||||
#wm-ipp .c td.n td.b {
|
||||
padding:0 6px 0 0 !important;
|
||||
text-align:right !important;
|
||||
overflow:visible;
|
||||
white-space:nowrap;
|
||||
color:#99a;
|
||||
vertical-align:middle;
|
||||
}
|
||||
#wm-ipp .c td.n tr.y td.b {
|
||||
padding:0 6px 2px 0 !important;
|
||||
}
|
||||
#wm-ipp .c td.n td.c {
|
||||
background:#000;
|
||||
color:#ff0;
|
||||
font-weight:bold;
|
||||
padding:0 !important;
|
||||
text-align:center;
|
||||
}
|
||||
#wm-ipp.hi .c td.n td.c {
|
||||
color:#ec008c;
|
||||
}
|
||||
#wm-ipp .c td.n td.f {
|
||||
padding:0 0 0 6px !important;
|
||||
text-align:left !important;
|
||||
overflow:visible;
|
||||
white-space:nowrap;
|
||||
color:#99a;
|
||||
vertical-align:middle;
|
||||
}
|
||||
#wm-ipp .c td.n tr.m td {
|
||||
text-transform:uppercase;
|
||||
white-space:nowrap;
|
||||
padding:2px 0;
|
||||
}
|
||||
#wm-ipp .c td.s {
|
||||
padding:0 5px 0 0 !important;
|
||||
text-align:center;
|
||||
vertical-align:bottom;
|
||||
}
|
||||
#wm-ipp #wm-nav-captures {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#wm-ipp .c td.s a.t {
|
||||
color:#33f;
|
||||
font-weight:bold;
|
||||
line-height: 1.8;
|
||||
}
|
||||
#wm-ipp .c td.s div.r {
|
||||
color: #666;
|
||||
font-size:9px;
|
||||
white-space:nowrap;
|
||||
}
|
||||
#wm-ipp .c td.k {
|
||||
vertical-align:bottom;
|
||||
padding-bottom:2px;
|
||||
}
|
||||
#wm-ipp .c td.s {
|
||||
padding:0 5px 2px 0 !important;
|
||||
}
|
||||
#wm-ipp td#displayMonthEl {
|
||||
padding: 2px 0 !important;
|
||||
}
|
||||
#wm-ipp td#displayYearEl {
|
||||
padding: 0 0 2px 0 !important;
|
||||
}
|
||||
|
||||
div#wm-ipp-sparkline {
|
||||
position:relative;/* for positioning markers */
|
||||
white-space:nowrap;
|
||||
background-color:#fff;
|
||||
cursor:pointer;
|
||||
line-height:0.9;
|
||||
}
|
||||
#sparklineImgId, #wm-sparkline-canvas {
|
||||
position:relative;
|
||||
z-index:9012;
|
||||
max-width:none;
|
||||
}
|
||||
#wm-ipp-sparkline div.yt {
|
||||
position:absolute;
|
||||
z-index:9010 !important;
|
||||
background-color:#ff0 !important;
|
||||
top: 0;
|
||||
}
|
||||
#wm-ipp-sparkline div.mt {
|
||||
position:absolute;
|
||||
z-index:9013 !important;
|
||||
background-color:#ec008c !important;
|
||||
top: 0;
|
||||
}
|
||||
#wm-ipp .r {
|
||||
position:relative;
|
||||
}
|
||||
#wm-ipp .r a {
|
||||
color:#33f;
|
||||
border:none;
|
||||
position:relative;
|
||||
background-color:transparent;
|
||||
background-repeat:no-repeat !important;
|
||||
background-position:100% 100% !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
#wm-ipp #wm-capinfo .c-logo {
|
||||
display:block;
|
||||
float:left;
|
||||
margin-right:3px;
|
||||
width:90px;
|
||||
min-height:90px;
|
||||
max-height: 290px;
|
||||
border-radius:45px;
|
||||
overflow:hidden;
|
||||
background-position:50%;
|
||||
background-size:auto 90px;
|
||||
box-shadow: 0 0 2px 2px rgba(208,208,208,128) inset;
|
||||
}
|
||||
#wm-ipp #wm-capinfo .c-logo span {
|
||||
display:inline-block;
|
||||
}
|
||||
#wm-ipp #wm-capinfo .c-logo img {
|
||||
height:90px;
|
||||
position:relative;
|
||||
left:-50%;
|
||||
}
|
||||
#wm-ipp #wm-capinfo .wm-title {
|
||||
font-size:130%;
|
||||
}
|
||||
#wm-ipp #wm-capinfo a.wm-selector {
|
||||
display:inline-block;
|
||||
color: #aaa;
|
||||
text-decoration:none !important;
|
||||
padding: 2px 8px;
|
||||
}
|
||||
#wm-ipp #wm-capinfo a.wm-selector.selected {
|
||||
background-color:#666;
|
||||
}
|
||||
#wm-ipp #wm-capinfo a.wm-selector:hover {
|
||||
color: #fff;
|
||||
}
|
||||
#wm-ipp #wm-capinfo.notice-only #wm-capinfo-collected-by,
|
||||
#wm-ipp #wm-capinfo.notice-only #wm-capinfo-timestamps {
|
||||
display: none;
|
||||
}
|
||||
#wm-ipp #wm-capinfo #wm-capinfo-notice .wm-capinfo-content {
|
||||
background-color:#ff0;
|
||||
padding:5px;
|
||||
font-size:14px;
|
||||
text-align:center;
|
||||
}
|
||||
#wm-ipp #wm-capinfo #wm-capinfo-notice .wm-capinfo-content * {
|
||||
font-size:14px;
|
||||
text-align:center;
|
||||
}
|
||||
#wm-ipp #wm-expand {
|
||||
right: 1px;
|
||||
bottom: -1px;
|
||||
color: #ffffff;
|
||||
background-color: #666 !important;
|
||||
padding:0 5px 0 3px !important;
|
||||
border-radius: 3px 3px 0 0 !important;
|
||||
}
|
||||
#wm-ipp #wm-expand span {
|
||||
color: #ffffff;
|
||||
}
|
||||
#wm-ipp #wm-expand #wm-expand-icon {
|
||||
display: inline-block;
|
||||
transition: transform 0.5s;
|
||||
transform-origin: 50% 45%;
|
||||
}
|
||||
#wm-ipp #wm-expand.wm-open #wm-expand-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
#wm-ipp #wmtb {
|
||||
text-align:right;
|
||||
}
|
||||
#wm-ipp #wmtb #wmtbURL {
|
||||
width: calc(100% - 45px);
|
||||
}
|
||||
#wm-ipp #wm-graph-anchor {
|
||||
border-right:1px solid #ccc;
|
||||
}
|
||||
/* time coherence */
|
||||
html.wb-highlight {
|
||||
box-shadow: inset 0 0 0 3px #a50e3a !important;
|
||||
}
|
||||
.wb-highlight {
|
||||
outline: 3px solid #a50e3a !important;
|
||||
}
|
||||
|
||||
@media (min-width:946px) {
|
||||
#wm-ipp #wm-graph-anchor {
|
||||
display:block !important;
|
||||
}
|
||||
}
|
||||
@media (max-width:945px) {
|
||||
#wm-ipp #wm-graph-anchor {
|
||||
display:none !important;
|
||||
}
|
||||
#wm-ipp table.c {
|
||||
width: 85%;
|
||||
width: calc(100% - 131px);
|
||||
}
|
||||
}
|
||||
@media (max-width:1096px) {
|
||||
#wm-logo {
|
||||
display:none !important;
|
||||
}
|
||||
}
|
||||
|
||||
#wm-btns {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#wm-btns>#wm-save-snapshot-open {
|
||||
margin-right: 7px;
|
||||
top: -6px;
|
||||
}
|
||||
|
||||
#wm-btns>#wm-sign-in {
|
||||
box-sizing: content-box;
|
||||
display: none;
|
||||
margin-right: 7px;
|
||||
top: -8px;
|
||||
|
||||
/*
|
||||
round border around sign in button
|
||||
*/
|
||||
border: 2px #000 solid;
|
||||
border-radius: 14px;
|
||||
padding-right: 2px;
|
||||
padding-bottom: 2px;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
#wm-btns>#wm-sign-in>.iconochive-person {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
#wm-save-snapshot-open > .iconochive-web {
|
||||
color:#000;
|
||||
font-size:160%;
|
||||
}
|
||||
|
||||
#wm-ipp #wm-share {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#wm-share > #wm-screenshot {
|
||||
display: inline-block;
|
||||
margin-right: 3px;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#wm-screenshot > .iconochive-image {
|
||||
color:#000;
|
||||
font-size:160%;
|
||||
}
|
||||
|
||||
#wm-btns>#wm-save-snapshot-in-progress {
|
||||
display: none;
|
||||
font-size:160%;
|
||||
opacity: 0.5;
|
||||
position: relative;
|
||||
margin-right: 7px;
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
#wm-btns>#wm-save-snapshot-success {
|
||||
display: none;
|
||||
color: green;
|
||||
position: relative;
|
||||
top: -7px;
|
||||
}
|
||||
|
||||
#wm-btns>#wm-save-snapshot-fail {
|
||||
display: none;
|
||||
color: red;
|
||||
position: relative;
|
||||
top: -7px;
|
||||
}
|
||||
|
||||
.wm-icon-screen-shot {
|
||||
background: url("../images/web-screenshot.svg") no-repeat !important;
|
||||
background-size: contain !important;
|
||||
width: 22px !important;
|
||||
height: 19px !important;
|
||||
|
||||
display: inline-block;
|
||||
}
|
||||
#donato #donato-base {
|
||||
height: 100%;
|
||||
}
|
||||
body.wm-modal {
|
||||
height: auto !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
#donato #donato-base {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 2147483639;
|
||||
}
|
||||
body.wm-modal #donato #donato-base {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 2147483640;
|
||||
}
|
||||
|
||||
.wb-autocomplete-suggestions {
|
||||
font-family: Lucida Grande, Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
cursor: default;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0;
|
||||
background: #fff;
|
||||
box-shadow: -1px 1px 3px rgba(0,0,0,.1);
|
||||
position: absolute;
|
||||
display: none;
|
||||
z-index: 2147483647;
|
||||
max-height: 254px;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wb-autocomplete-suggestion {
|
||||
position: relative;
|
||||
padding: 0 .6em;
|
||||
line-height: 23px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 1.02em;
|
||||
color: #333;
|
||||
}
|
||||
.wb-autocomplete-suggestion b {
|
||||
font-weight: bold;
|
||||
}
|
||||
.wb-autocomplete-suggestion.selected {
|
||||
background: #f0f0f0;
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,40 @@
|
|||
@font-face {
|
||||
font-family: 'PT Sans';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://web.archive.org/web/20191223015732im_/https://fonts.gstatic.com/s/ptsans/v11/jizYRExUiTo99u79D0e0x8mN.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'PT Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('PT Sans'), local('PTSans-Regular'), url(http://web.archive.org/web/20191223015732im_/https://fonts.gstatic.com/s/ptsans/v11/jizaRExUiTo99u79D0KEwA.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'PT Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://web.archive.org/web/20191223015732im_/https://fonts.gstatic.com/s/ptsans/v11/jizfRExUiTo99u79B_mh0O6tKA.ttf) format('truetype');
|
||||
}
|
||||
|
||||
/*
|
||||
FILE ARCHIVED ON 01:57:32 Dec 23, 2019 AND RETRIEVED FROM THE
|
||||
INTERNET ARCHIVE ON 21:09:16 Jun 24, 2020.
|
||||
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
|
||||
|
||||
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
|
||||
SECTION 108(a)(3)).
|
||||
*/
|
||||
/*
|
||||
playback timings (ms):
|
||||
CDXLines.iter: 85.235 (4)
|
||||
exclusion.robots.policy: 0.114
|
||||
PetaboxLoader3.datanode: 155.163 (5)
|
||||
PetaboxLoader3.resolve: 132.242
|
||||
load_resource: 195.693
|
||||
RedisCDXSource: 9.849
|
||||
exclusion.robots: 0.122
|
||||
LoadShardBlock: 350.806 (4)
|
||||
esindex: 0.01
|
||||
captures_list: 1216.032
|
||||
*/
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body {transition: opacity ease-in 0.2s; }
|
||||
body[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; }
|
||||
</style><title>Donate</title><style>body{margin:0}</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="donate_data/jquery-1.js"></script>
|
||||
<script src="donate_data/polyfill.js"></script>
|
||||
<script src="donate_data/ie-dom-node-remove-polyfill.js"></script>
|
||||
<script src="donate_data/analytics.js"></script>
|
||||
<script src="donate_data/webcomponents-bundle.js" type="text/javascript"></script>
|
||||
<script src="donate_data/more-facets.js" type="text/javascript"></script>
|
||||
<script src="donate_data/radio-player-controller.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="js-ia-iframe" style="margin:0">
|
||||
<meta property="braintree_token" content="production_w3jccm3z_pqd7hz44swp6zvvw">
|
||||
<meta property="environment" content="production">
|
||||
<meta property="venmo_id" content="2878003111190856236">
|
||||
|
||||
|
||||
</body></html>
|
|
@ -0,0 +1,423 @@
|
|||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0
|
||||
/* eslint-disable no-var, semi, prefer-arrow-callback, prefer-template */
|
||||
|
||||
/**
|
||||
* Collection of methods for sending analytics events to Archive.org's analytics server.
|
||||
*
|
||||
* These events are used for internal stats and sent (in anonymized form) to Google Analytics.
|
||||
*
|
||||
* @see analytics.md
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
window.archive_analytics = (function defineArchiveAnalytics() {
|
||||
// keep orignal Date object so as not to be affected by wayback's
|
||||
// hijacking global Date object
|
||||
var Date = window.Date;
|
||||
var ARCHIVE_ANALYTICS_VERSION = 2;
|
||||
var DEFAULT_SERVICE = 'ao_2';
|
||||
|
||||
var startTime = new Date();
|
||||
|
||||
/**
|
||||
* @return {Boolean}
|
||||
*/
|
||||
function isPerformanceTimingApiSupported() {
|
||||
return 'performance' in window && 'timing' in window.performance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines how many milliseconds elapsed between the browser starting to parse the DOM and
|
||||
* the current time.
|
||||
*
|
||||
* Uses the Performance API or a fallback value if it's not available.
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Performance_API
|
||||
*
|
||||
* @return {Number}
|
||||
*/
|
||||
function getLoadTime() {
|
||||
var start;
|
||||
|
||||
if (isPerformanceTimingApiSupported())
|
||||
start = window.performance.timing.domLoading;
|
||||
else
|
||||
start = startTime.getTime();
|
||||
|
||||
return new Date().getTime() - start;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines how many milliseconds elapsed between the user navigating to the page and
|
||||
* the current time.
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Performance_API
|
||||
*
|
||||
* @return {Number|null} null if the browser doesn't support the Performance API
|
||||
*/
|
||||
function getNavToDoneTime() {
|
||||
if (!isPerformanceTimingApiSupported())
|
||||
return null;
|
||||
|
||||
return new Date().getTime() - window.performance.timing.navigationStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs an arithmetic calculation on a string with a number and unit, while maintaining
|
||||
* the unit.
|
||||
*
|
||||
* @param {String} original value to modify, with a unit
|
||||
* @param {Function} doOperation accepts one Number parameter, returns a Number
|
||||
* @returns {String}
|
||||
*/
|
||||
function computeWithUnit(original, doOperation) {
|
||||
var number = parseFloat(original, 10);
|
||||
var unit = original.replace(/(\d*\.\d+)|\d+/, '');
|
||||
|
||||
return doOperation(number) + unit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the default font size of the browser.
|
||||
*
|
||||
* @returns {String|null} computed font-size with units (typically pixels), null if it cannot be computed
|
||||
*/
|
||||
function getDefaultFontSize() {
|
||||
var fontSizeStr;
|
||||
|
||||
if (!('getComputedStyle' in window))
|
||||
return null;
|
||||
|
||||
var style = window.getComputedStyle(document.documentElement);
|
||||
if (!style)
|
||||
return null;
|
||||
|
||||
fontSizeStr = style.fontSize;
|
||||
|
||||
// Don't modify the value if tracking book reader.
|
||||
if (document.documentElement.classList.contains('BookReaderRoot'))
|
||||
return fontSizeStr;
|
||||
|
||||
return computeWithUnit(fontSizeStr, function reverseBootstrapFontSize(number) {
|
||||
// Undo the 62.5% size applied in the Bootstrap CSS.
|
||||
return number * 1.6;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the URL parameters for a given Location
|
||||
* @param {Location}
|
||||
* @return {Object} The URL parameters
|
||||
*/
|
||||
function getParams(location) {
|
||||
if (!location) location = window.location;
|
||||
var vars;
|
||||
var i;
|
||||
var pair;
|
||||
var params = {};
|
||||
var query = location.search;
|
||||
if (!query) return params;
|
||||
vars = query.substring(1).split('&');
|
||||
for (i = 0; i < vars.length; i++) {
|
||||
pair = vars[i].split('=');
|
||||
params[pair[0]] = decodeURIComponent(pair[1]);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* @type {String|null}
|
||||
*/
|
||||
service: null,
|
||||
|
||||
/**
|
||||
* Key-value pairs to send in pageviews (you can read this after a pageview to see what was
|
||||
* sent).
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
values: {},
|
||||
|
||||
/**
|
||||
* Sends an analytics ping, preferably using navigator.sendBeacon()
|
||||
* @param {Object} values
|
||||
* @param {Function} [onload_callback] (deprecated) callback to invoke once ping to analytics server is done
|
||||
* @param {Boolean} [augment_for_ao_site] (deprecated) if true, add some archive.org site-specific values
|
||||
*/
|
||||
send_ping: function send_ping(values, onload_callback, augment_for_ao_site) {
|
||||
if (typeof window.navigator !== 'undefined' && typeof window.navigator.sendBeacon !== 'undefined')
|
||||
this.send_ping_via_beacon(values);
|
||||
else
|
||||
this.send_ping_via_image(values);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sends a ping via Beacon API
|
||||
* NOTE: Assumes window.navigator.sendBeacon exists
|
||||
* @param {Object} values Tracking parameters to pass
|
||||
*/
|
||||
send_ping_via_beacon: function send_ping_via_beacon(values) {
|
||||
var url = this.generate_tracking_url(values || {});
|
||||
window.navigator.sendBeacon(url);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sends a ping via Image object
|
||||
* @param {Object} values Tracking parameters to pass
|
||||
*/
|
||||
send_ping_via_image: function send_ping_via_image(values) {
|
||||
var url = this.generate_tracking_url(values || {});
|
||||
var loadtime_img = new Image(1, 1);
|
||||
loadtime_img.src = url;
|
||||
},
|
||||
|
||||
/**
|
||||
* Construct complete tracking URL containing payload
|
||||
* @param {Object} params Tracking parameters to pass
|
||||
* @return {String} URL to use for tracking call
|
||||
*/
|
||||
generate_tracking_url: function generate_tracking_url(params) {
|
||||
var baseUrl = '//analytics.archive.org/0.gif';
|
||||
var keys;
|
||||
var outputParams = params;
|
||||
var outputParamsArray = [];
|
||||
|
||||
outputParams.service = outputParams.service || this.service || DEFAULT_SERVICE;
|
||||
|
||||
// Build array of querystring parameters
|
||||
keys = Object.keys(outputParams);
|
||||
keys.forEach(function keyIteration(key) {
|
||||
outputParamsArray.push(encodeURIComponent(key) + '=' + encodeURIComponent(outputParams[key]));
|
||||
});
|
||||
outputParamsArray.push('version=' + ARCHIVE_ANALYTICS_VERSION);
|
||||
outputParamsArray.push('count=' + (keys.length + 2)); // Include `version` and `count` in count
|
||||
|
||||
return baseUrl + '?' + outputParamsArray.join('&');
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {int} page Page number
|
||||
*/
|
||||
send_scroll_fetch_event: function send_scroll_fetch_event(page) {
|
||||
var additionalValues = { ev: page };
|
||||
var loadTime = getLoadTime();
|
||||
var navToDoneTime = getNavToDoneTime();
|
||||
if (loadTime) additionalValues.loadtime = loadTime;
|
||||
if (navToDoneTime) additionalValues.nav_to_done_ms = navToDoneTime;
|
||||
this.send_event('page_action', 'scroll_fetch', location.pathname, additionalValues);
|
||||
},
|
||||
|
||||
send_scroll_fetch_base_event: function send_scroll_fetch_base_event() {
|
||||
var additionalValues = {};
|
||||
var loadTime = getLoadTime();
|
||||
var navToDoneTime = getNavToDoneTime();
|
||||
if (loadTime) additionalValues.loadtime = loadTime;
|
||||
if (navToDoneTime) additionalValues.nav_to_done_ms = navToDoneTime;
|
||||
this.send_event('page_action', 'scroll_fetch_base', location.pathname, additionalValues);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Object} [options]
|
||||
* @param {String} [options.mediaType]
|
||||
* @param {String} [options.mediaLanguage]
|
||||
* @param {String} [options.page] The path portion of the page URL
|
||||
*/
|
||||
send_pageview: function send_pageview(options) {
|
||||
var settings = options || {};
|
||||
|
||||
var defaultFontSize;
|
||||
var loadTime = getLoadTime();
|
||||
var mediaType = settings.mediaType;
|
||||
var primaryCollection = settings.primaryCollection;
|
||||
var page = settings.page;
|
||||
var navToDoneTime = getNavToDoneTime();
|
||||
|
||||
/**
|
||||
* @return {String}
|
||||
*/
|
||||
function get_locale() {
|
||||
if (navigator) {
|
||||
if (navigator.language)
|
||||
return navigator.language;
|
||||
|
||||
else if (navigator.browserLanguage)
|
||||
return navigator.browserLanguage;
|
||||
|
||||
else if (navigator.systemLanguage)
|
||||
return navigator.systemLanguage;
|
||||
|
||||
else if (navigator.userLanguage)
|
||||
return navigator.userLanguage;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
defaultFontSize = getDefaultFontSize();
|
||||
|
||||
// Set field values
|
||||
this.values.kind = 'pageview';
|
||||
this.values.timediff = (new Date().getTimezoneOffset()/60)*(-1); // *timezone* diff from UTC
|
||||
this.values.locale = get_locale();
|
||||
this.values.referrer = (document.referrer == '' ? '-' : document.referrer);
|
||||
|
||||
if (loadTime)
|
||||
this.values.loadtime = loadTime;
|
||||
|
||||
if (navToDoneTime)
|
||||
this.values.nav_to_done_ms = navToDoneTime;
|
||||
|
||||
/* START CUSTOM DIMENSIONS */
|
||||
if (defaultFontSize)
|
||||
this.values.ga_cd1 = defaultFontSize;
|
||||
|
||||
if ('devicePixelRatio' in window)
|
||||
this.values.ga_cd2 = window.devicePixelRatio;
|
||||
|
||||
if (mediaType)
|
||||
this.values.ga_cd3 = mediaType;
|
||||
|
||||
if (settings.mediaLanguage) {
|
||||
this.values.ga_cd4 = settings.mediaLanguage;
|
||||
}
|
||||
|
||||
if (primaryCollection) {
|
||||
this.values.ga_cd5 = primaryCollection;
|
||||
}
|
||||
/* END CUSTOM DIMENSIONS */
|
||||
|
||||
if (page)
|
||||
this.values.page = page;
|
||||
|
||||
this.send_ping(this.values);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sends a tracking "Event".
|
||||
* @param {string} category
|
||||
* @param {string} action
|
||||
* @param {string} label
|
||||
* @param {Object} additionalEventParams
|
||||
*/
|
||||
send_event: function send_event(
|
||||
category,
|
||||
action,
|
||||
label,
|
||||
additionalEventParams
|
||||
) {
|
||||
if (!label) label = window.location.pathname;
|
||||
if (!additionalEventParams) additionalEventParams = {};
|
||||
if (additionalEventParams.mediaLanguage) {
|
||||
additionalEventParams.ga_cd4 = additionalEventParams.mediaLanguage;
|
||||
delete additionalEventParams.mediaLanguage;
|
||||
}
|
||||
var eventParams = Object.assign(
|
||||
{
|
||||
kind: 'event',
|
||||
ec: category,
|
||||
ea: action,
|
||||
el: label,
|
||||
cache_bust: Math.random(),
|
||||
},
|
||||
additionalEventParams
|
||||
);
|
||||
this.send_ping(eventParams);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Object} options see this.send_pageview options
|
||||
*/
|
||||
send_pageview_on_load: function send_pageview_on_load(options) {
|
||||
var self = this;
|
||||
|
||||
window.addEventListener('load', function send_pageview_with_options() {
|
||||
self.send_pageview(options);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles tracking events passed in URL.
|
||||
* Assumes category and action values are separated by a "|" character.
|
||||
* NOTE: Uses the unsampled analytics property. Watch out for future high click links!
|
||||
* @param {Location}
|
||||
*/
|
||||
process_url_events: function process_url_events(location) {
|
||||
var eventValues;
|
||||
var actionValue;
|
||||
var eventValue = getParams(location).iax;
|
||||
if (!eventValue) return;
|
||||
eventValues = eventValue.split('|');
|
||||
actionValue = eventValues.length >= 1 ? eventValues[1] : '';
|
||||
this.send_event(
|
||||
eventValues[0],
|
||||
actionValue,
|
||||
window.location.pathname,
|
||||
{ service: 'ao_no_sampling' }
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Attaches handlers for event tracking.
|
||||
*
|
||||
* To enable click tracking for a link, add a `data-event-click-tracking`
|
||||
* attribute containing the Google Analytics Event Category and Action, separated
|
||||
* by a vertical pipe (|).
|
||||
* e.g. `<a href="foobar" data-event-click-tracking="TopNav|FooBar">`
|
||||
*
|
||||
* To enable form submit tracking, add a `data-event-form-tracking` attribute
|
||||
* to the `form` tag.
|
||||
* e.g. `<form data-event-form-tracking="TopNav|SearchForm" method="GET">`
|
||||
*
|
||||
* Additional tracking options can be added via a `data-event-tracking-options`
|
||||
* parameter. This parameter, if included, should be a JSON string of the parameters.
|
||||
* Valid parameters are:
|
||||
* - service {string}: Corresponds to the Google Analytics property data values flow into
|
||||
*/
|
||||
set_up_event_tracking: function set_up_event_tracking() {
|
||||
var self = this;
|
||||
var clickTrackingAttributeName = 'event-click-tracking';
|
||||
var formTrackingAttributeName = 'event-form-tracking';
|
||||
var trackingOptionsAttributeName = 'event-tracking-options';
|
||||
|
||||
function makeActionHandler(attributeName) {
|
||||
return function actionHandler(event) {
|
||||
var $currentTarget;
|
||||
var categoryAction;
|
||||
var categoryActionParts;
|
||||
var options;
|
||||
var submitFormFunction;
|
||||
$currentTarget = $(event.currentTarget);
|
||||
if (!$currentTarget) return;
|
||||
categoryAction = $currentTarget.data(attributeName);
|
||||
if (!categoryAction) return;
|
||||
categoryActionParts = categoryAction.split('|');
|
||||
options = $currentTarget.data(trackingOptionsAttributeName) || {}; // Converts to JSON
|
||||
self.send_event(
|
||||
categoryActionParts[0],
|
||||
categoryActionParts[1],
|
||||
window.location.pathname,
|
||||
options.service ? { service: options.service } : {}
|
||||
);
|
||||
};
|
||||
}
|
||||
$(document).on(
|
||||
'click',
|
||||
'[data-' + clickTrackingAttributeName + ']',
|
||||
makeActionHandler(clickTrackingAttributeName)
|
||||
);
|
||||
$(document).on(
|
||||
'submit',
|
||||
'form[data-' + formTrackingAttributeName + ']',
|
||||
makeActionHandler(formTrackingAttributeName)
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns {Object[]}
|
||||
*/
|
||||
get_data_packets: function get_data_packets() {
|
||||
return [this.values];
|
||||
},
|
||||
};
|
||||
}());
|
||||
// @license-end
|
|
@ -0,0 +1,4 @@
|
|||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0
|
||||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=46)}({46:function(e,t){[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))}});
|
||||
//# sourceMappingURL=ie-dom-node-remove-polyfill.min.js.map
|
||||
// @license-end
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,298 @@
|
|||
/**
|
||||
@license @nocompile
|
||||
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
(function(){/*
|
||||
|
||||
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
'use strict';var w;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ca(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function da(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}
|
||||
var ea="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,ha="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ia(){ia=function(){};ea.Symbol||(ea.Symbol=ja)}function ma(a,b){this.a=a;ha(this,"description",{configurable:!0,writable:!0,value:b})}ma.prototype.toString=function(){return this.a};
|
||||
var ja=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new ma("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}();function na(){ia();var a=ea.Symbol.iterator;a||(a=ea.Symbol.iterator=ea.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype |