-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: janusweb action: commit revision: path_from: revision_from: 4371c0dbbfa887c546eda4da2177336c0a8eb851: path_to: revision_to:
commit 4371c0dbbfa887c546eda4da2177336c0a8eb851 Author: James Baicoianu <james_github@baicoianu.com> Date: Tue Mar 27 14:23:02 2018 -0700 Added room.referrer diff --git a/scripts/janusweb.js b/scripts/janusweb.js
--- a/scripts/janusweb.js +++ b/scripts/janusweb.js @@ -290,6 +290,10 @@ elation.require([ corsproxy: this.corsproxy, deferload: true }); + + if (this.currentroom) { + room.referrer = this.currentroom.url; + } elation.events.fire({element: this, type: 'room_load_start', data: room}); room.load(); // FIXME - should be able to spawn without adding to the heirarchy yet @@ -311,7 +315,7 @@ elation.require([ return this.load(dataurl, makeactive, baseurl) } this.setActiveRoom = function(url, pos, skipURLUpdate) { - this.clear(); + var oldroom = this.currentroom; var room = false; this.loading = true; @@ -334,7 +338,13 @@ elation.require([ } else { this.properties.url = url; } - if (this.currentroom !== room) { + if (oldroom !== room) { + // Set referrer so we know where this link came from + if (oldroom) { + room.referrer = oldroom.url; + } + + this.clear(); this.currentroom = room; window.room = this.currentroom.getProxyObject();
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 17:02:59 2024