UNPKG

swup

Version:

Complete, flexible, extensible and easy to use page transition library for your web.

14 lines (12 loc) 446 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var createHistoryRecord = function createHistoryRecord(url) { window.history.pushState({ url: url || window.location.href.split(window.location.hostname)[1], random: Math.random(), source: 'swup' }, document.getElementsByTagName('title')[0].innerText, url || window.location.href.split(window.location.hostname)[1]); }; exports.default = createHistoryRecord;