Rename placeholders
Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
parent
3835946c00
commit
372b96c895
@ -117,13 +117,13 @@ class Readability(Falkon.PluginInterface, QtCore.QObject):
|
|||||||
css = Falkon.QzTools.readAllFileContents(
|
css = Falkon.QzTools.readAllFileContents(
|
||||||
os.path.join(dataDir, "style.css")
|
os.path.join(dataDir, "style.css")
|
||||||
).replace("\n", "")
|
).replace("\n", "")
|
||||||
css = css.replace("{1}", iconClose)
|
css = css.replace("{iconClose}", iconClose)
|
||||||
css = css.replace("{2}", iconCloseHover)
|
css = css.replace("{iconCloseHover}", iconCloseHover)
|
||||||
css = css.replace("{3}", iconDelete)
|
css = css.replace("{iconDelete}", iconDelete)
|
||||||
css = css.replace("{4}", iconPlus)
|
css = css.replace("{iconPlus}", iconPlus)
|
||||||
css = css.replace("{5}", iconMinus)
|
css = css.replace("{iconMinus}", iconMinus)
|
||||||
css = css.replace("{6}", iconArrow)
|
css = css.replace("{iconArrow}", iconArrow)
|
||||||
css = css.replace("{7}", iconControls)
|
css = css.replace("{iconControls}", iconControls)
|
||||||
|
|
||||||
javascript = Falkon.QzTools.readAllFileContents(
|
javascript = Falkon.QzTools.readAllFileContents(
|
||||||
os.path.join(dataDir, "Readability.js")
|
os.path.join(dataDir, "Readability.js")
|
||||||
@ -134,9 +134,9 @@ class Readability(Falkon.PluginInterface, QtCore.QObject):
|
|||||||
call = Falkon.QzTools.readAllFileContents(
|
call = Falkon.QzTools.readAllFileContents(
|
||||||
os.path.join(dataDir, "Call.js")
|
os.path.join(dataDir, "Call.js")
|
||||||
)
|
)
|
||||||
call = call.replace("{1}", javascript)
|
call = call.replace("{readability.js}", javascript)
|
||||||
call = call.replace("{2}", toolbar)
|
call = call.replace("{toolbar.js}", toolbar)
|
||||||
call = call.replace("{3}", css)
|
call = call.replace("{style.css}", css)
|
||||||
|
|
||||||
self.view.page().runJavaScript(call)
|
self.view.page().runJavaScript(call)
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* ============================================================ */
|
* ============================================================ */
|
||||||
|
|
||||||
{1}
|
{readability.js}
|
||||||
|
|
||||||
{2}
|
{toolbar.js}
|
||||||
|
|
||||||
function callReadability(){
|
function callReadability(){
|
||||||
var article = new Readability(document).parse();
|
var article = new Readability(document).parse();
|
||||||
@ -34,7 +34,7 @@ function readabilityHead(article){
|
|||||||
head.appendChild(title);
|
head.appendChild(title);
|
||||||
|
|
||||||
var css = document.createElement('style');
|
var css = document.createElement('style');
|
||||||
css.innerHTML = '{3}';
|
css.innerHTML = '{style.css}';
|
||||||
head.appendChild(css);
|
head.appendChild(css);
|
||||||
|
|
||||||
var meta = document.createElement('meta');
|
var meta = document.createElement('meta');
|
||||||
|
@ -344,7 +344,7 @@ body.loaded {
|
|||||||
left: -16px;
|
left: -16px;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
background-image: url({6});
|
background-image: url({iconArrow});
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -480,7 +480,7 @@ body.loaded {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.remove-button {
|
.remove-button {
|
||||||
background-image: url({3});
|
background-image: url({iconDelete});
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border: 1px solid #c1c1c1;
|
border: 1px solid #c1c1c1;
|
||||||
background-position: 10px 7px;
|
background-position: 10px 7px;
|
||||||
@ -494,35 +494,35 @@ body.loaded {
|
|||||||
/*======= Toolbar icons =======*/
|
/*======= Toolbar icons =======*/
|
||||||
|
|
||||||
.close-button {
|
.close-button {
|
||||||
background-image: url({1});
|
background-image: url({iconClose});
|
||||||
height: 68px;
|
height: 68px;
|
||||||
background-position: center 8px;
|
background-position: center 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-button:hover {
|
.close-button:hover {
|
||||||
background-image: url({2});
|
background-image: url({iconCloseHover});
|
||||||
background-color: #d94141;
|
background-color: #d94141;
|
||||||
border-bottom: 1px solid #d94141;
|
border-bottom: 1px solid #d94141;
|
||||||
border-right: 1px solid #d94141;
|
border-right: 1px solid #d94141;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-button:hover:active {
|
.close-button:hover:active {
|
||||||
background-image: url({2});
|
background-image: url({iconCloseHover});
|
||||||
background-color: #AE2325;
|
background-color: #AE2325;
|
||||||
border-bottom: 1px solid #AE2325;
|
border-bottom: 1px solid #AE2325;
|
||||||
border-right: 1px solid #AE2325;
|
border-right: 1px solid #AE2325;
|
||||||
}
|
}
|
||||||
|
|
||||||
.style-button {
|
.style-button {
|
||||||
background-image: url({7});
|
background-image: url({iconControls});
|
||||||
}
|
}
|
||||||
|
|
||||||
.minus-button {
|
.minus-button {
|
||||||
background-image: url({5});
|
background-image: url({iconMinus});
|
||||||
}
|
}
|
||||||
|
|
||||||
.plus-button {
|
.plus-button {
|
||||||
background-image: url({4});
|
background-image: url({iconPlus});
|
||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
|
Loading…
Reference in New Issue
Block a user