Fixed bug in creating the 'previous posts' link and added mention to the beta version of this extension
diff --git a/console_inject.js b/console_inject.js
index f8e5b44..5b772ed 100644
--- a/console_inject.js
+++ b/console_inject.js
@@ -52,9 +52,11 @@
if (options.history && ("parentNode" in node) && node.parentNode !== null && ("tagName" in node.parentNode) && node.parentNode.tagName == "EC-USER") {
var nameElement = node.querySelector(".name span");
if (nameElement !== null) {
- var name = encodeURIComponent(nameElement.innerText);
+ var name = nameElement.innerText;
+ var query = encodeURIComponent("(creator:\""+name+"\" | replier:\""+name+"\") -forum:0");
+ var urlpart = encodeURIComponent("query="+query);
var link = document.createElement("a");
- link.setAttribute("href", "https://support.google.com/s/community/search/query%3D%2528creator%253A%2522"+name+"%2522%2B%257C%2Breplier%253A%2522"+name+"%2522%2529%2B-forum%253A0");
+ link.setAttribute("href", "https://support.google.com/s/community/search/"+urlpart);
link.innerText = chrome.i18n.getMessage("inject_previousposts");
node.querySelector(".main-card").appendChild(document.createElement("br"));
node.querySelector(".main-card").appendChild(link);