InoReader - Fix Open Article in Background Tab

Fixes InoReader's keyboard shortcut to open articles in background tabs in Firefox

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        InoReader - Fix Open Article in Background Tab
// @namespace   https://greasyfork.org/en/users/13300-littlepluto
// @description Fixes InoReader's keyboard shortcut to open articles in background tabs in Firefox
// @match       http://www.inoreader.com/*
// @version     1.1
// @grant       GM_openInTab
// ==/UserScript==
var element = document.createElement('div');
element.id = 'inoreader_companion_div';
document.body.appendChild(element);
window.addEventListener('message', receiveMessage);
function receiveMessage(event) {
  //console.log("receiveMessage event: ");
  //console.log(event);
  if (event.origin == 'http://www.inoreader.com') {
    if (event.data.request && event.data.request.url) {
      //console.log(event.data.request.url);
      GM_openInTab(event.data.request.url, true);
    }
  }
}