Page Info Panel

By ilovewimp Last update Nov 19, 2009 — Installed 114 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 4, 1, 4, 1, 1, 1, 2, 1

There are 3 previous versions of this script.

// ==UserScript==
// @name	Page Info Panel
// @namespace	http://www-ui.is.s.u-tokyo.ac.jp/~kobayash/
// @description	Adds a small panel onto the bottom-right corner of the window that contains the document title, URL, refferrer, and last modification date, allowing you to quickly find and copy these information.
// @exclude	file://*
// ==/UserScript==

(function () {
  if (document.designMode == 'on' || document.body instanceof HTMLFrameSetElement || document.URL.indexOf(location.protocol) != 0) return;

  const generalName = 'Page Info Panel';
  const containerID = (generalName + new Date()).replace(/\W/g, '');

  GM_addStyle('div#' + containerID + ' { position: fixed !important; right: 0 !important; bottom: 0 !important; width: 0 !important; height: 0 !important; font: normal small/1 sans-serif !important; color: black !important; background: url("data:image/gif;base64,R0lGODlhEAAQAMQfAGm6/idTd4yTmF+v8Xa37KvW+lyh3KHJ62aq41ee2bXZ98nm/2mt5W2Ck5XN/C1chEZieho8WXXA/2Gn4P39/W+y6V+l3qjP8Njt/lx2izxPYGyv51Oa1EJWZ////////yH5BAEAAB8ALAAAAAAQABAAAAWH4Cd+Xml6Y0pCQts0EKp6GbYshaM/skhjhCChUmFIeL4OsHIxXRAISQTl6SgIG8+FgfBMoh2qtbLZQr0TQJhk3TC4pYPBApiyFVDEwSOf18UFXxMWBoUJBn9sDgmDewcJCRyJJBoEkRyYmAABPZQEAAOhA5seFDMaDw8BAQ9TpiokJyWwtLUhADs=") 50% 50% no-repeat !important; margin: 2px !important; padding: 8px !important; z-index: 65535 !important; overflow: auto; opacity: 0.25 !important; } div#' + containerID + ' > span { display: none !important; margin: 0 !important; padding: 0 !important; list-style-type: none !important; text-align: left !important; line-height: 1.25 !important; white-space: nowrap !important; cursor: pointer !important; } div#' + containerID + ':hover { background: white !important; width: auto !important; height: auto !important; max-width: 100% !important; max-height: 25% !important; border: 1px outset black !important; opacity: 1 !important; -moz-border-radius: 8px !important; -moz-box-sizing: border-box !important; } div#' + containerID + ':hover > span { display: block !important; }');

  const panel = document.body.appendChild(document.createElement('DIV'));

  panel.id = containerID;
  panel.title = generalName;

  const setup = function (info, name) {
    var o = panel.appendChild(document.createElement('SPAN'));

    o.title = name + ' - ' + generalName;
    o.appendChild(document.createTextNode(info || '(No ' + name + ')'));
    o.setAttribute('onmouseover', 'window.getSelection().selectAllChildren(this)');
  };

  setup(document.title, 'Title');
  setup(document.URL, 'URL');
  setup(document.referrer, 'Referrer');
  setup(document.lastModified, 'Last Modified');
  setup((document.title || document.URL).link(document.URL), 'Link to This Page');
})()