Rename placeholders

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-06-20 18:17:12 +02:00
parent 3835946c00
commit 372b96c895
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07
3 changed files with 21 additions and 21 deletions

View File

@ -117,13 +117,13 @@ class Readability(Falkon.PluginInterface, QtCore.QObject):
css = Falkon.QzTools.readAllFileContents(
os.path.join(dataDir, "style.css")
).replace("\n", "")
css = css.replace("{1}", iconClose)
css = css.replace("{2}", iconCloseHover)
css = css.replace("{3}", iconDelete)
css = css.replace("{4}", iconPlus)
css = css.replace("{5}", iconMinus)
css = css.replace("{6}", iconArrow)
css = css.replace("{7}", iconControls)
css = css.replace("{iconClose}", iconClose)
css = css.replace("{iconCloseHover}", iconCloseHover)
css = css.replace("{iconDelete}", iconDelete)
css = css.replace("{iconPlus}", iconPlus)
css = css.replace("{iconMinus}", iconMinus)
css = css.replace("{iconArrow}", iconArrow)
css = css.replace("{iconControls}", iconControls)
javascript = Falkon.QzTools.readAllFileContents(
os.path.join(dataDir, "Readability.js")
@ -134,9 +134,9 @@ class Readability(Falkon.PluginInterface, QtCore.QObject):
call = Falkon.QzTools.readAllFileContents(
os.path.join(dataDir, "Call.js")
)
call = call.replace("{1}", javascript)
call = call.replace("{2}", toolbar)
call = call.replace("{3}", css)
call = call.replace("{readability.js}", javascript)
call = call.replace("{toolbar.js}", toolbar)
call = call.replace("{style.css}", css)
self.view.page().runJavaScript(call)

View File

@ -16,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ============================================================ */
{1}
{readability.js}
{2}
{toolbar.js}
function callReadability(){
var article = new Readability(document).parse();
@ -34,7 +34,7 @@ function readabilityHead(article){
head.appendChild(title);
var css = document.createElement('style');
css.innerHTML = '{3}';
css.innerHTML = '{style.css}';
head.appendChild(css);
var meta = document.createElement('meta');

View File

@ -344,7 +344,7 @@ body.loaded {
left: -16px;
width: 24px;
height: 24px;
background-image: url({6});
background-image: url({iconArrow});
display: block;
}
@ -480,7 +480,7 @@ body.loaded {
}
.remove-button {
background-image: url({3});
background-image: url({iconDelete});
margin: 0 auto;
border: 1px solid #c1c1c1;
background-position: 10px 7px;
@ -494,35 +494,35 @@ body.loaded {
/*======= Toolbar icons =======*/
.close-button {
background-image: url({1});
background-image: url({iconClose});
height: 68px;
background-position: center 8px;
}
.close-button:hover {
background-image: url({2});
background-image: url({iconCloseHover});
background-color: #d94141;
border-bottom: 1px solid #d94141;
border-right: 1px solid #d94141;
}
.close-button:hover:active {
background-image: url({2});
background-image: url({iconCloseHover});
background-color: #AE2325;
border-bottom: 1px solid #AE2325;
border-right: 1px solid #AE2325;
}
.style-button {
background-image: url({7});
background-image: url({iconControls});
}
.minus-button {
background-image: url({5});
background-image: url({iconMinus});
}
.plus-button {
background-image: url({4});
background-image: url({iconPlus});
}
@media print {