Add workaround to run CAA on Waterfox in multi-process mode

Este commit está contenido en:
JustOff
2018-10-14 20:52:50 +03:00
padre ef65b7df74
commit a5658100f6
Se han modificado 2 ficheros con 38 adiciones y 5 borrados

Ver fichero

@@ -1,10 +1,14 @@
"use strict";
let EXPORTED_SYMBOLS = ["TCloud"];
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
let TCloud = {
showPage: function(document, db) {
let template = this.template;
template = this.processTemplate(template);
document.title = "Tag Cloud :: Classic Add-ons Archive";
let contfrag = document.createRange().createContextualFragment(template);
@@ -13,6 +17,15 @@ let TCloud = {
page.appendChild(frag);
},
processTemplate: function(template) {
if (Services.appinfo.browserTabsRemoteAutostart) {
template = template.replace("%E10S%", "<div style='float: right; border: 1px solid #c9ddf2; padding: 3px; margin-top: 2px;'><a style='text-decoration: none;' href='https://github.com/JustOff/ca-archive/issues/2' target='_blank'>&lowast;&#8201;" + Services.appinfo.name + " in multi-process mode can't restore <span style='font-style: italic;'>caa:</span> urls after restart&#8202;&lowast;</a></div>");
} else {
template = template.replace("%E10S%", "");
}
return template;
},
template: `<html>
<body>
<div>
@@ -47,6 +60,7 @@ let TCloud = {
</section>
<section class="primary">
%E10S%
<h1>Most Popular Tags</h1>
<div class="island hero c listing">