-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1903 from openzim/1664-mobile-html-renderer
Implement new Wikimedia mobile end-point support/render
- Loading branch information
Showing
49 changed files
with
915 additions
and
261 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html class='client-js'> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<title></title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> __ARTICLE_CANONICAL_LINK__ __ARTICLE_CSS_LIST__ | ||
__CSS_LINKS__ __JS_SCRIPTS__ | ||
</head> | ||
<body class="mediawiki mw-hide-empty-elt ns-0 ns-subject stable skin-minerva action-view animations"> | ||
<div id="mw-mf-viewport" class="feature-header-v2"> | ||
<div id="mw-mf-page-center"> | ||
<div id="content" class="mw-body"> | ||
<a id="top"></a> | ||
<div id="bodyContent" class="content mw-parser-output"> | ||
<h1 id="titleHeading" style="background-color: white; margin: 0;"></h1> | ||
<div id="mw-content-text"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
__ARTICLE_CONFIGVARS_LIST__ | ||
__ARTICLE_JS_LIST__ | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html class='client-js'> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<title></title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> __ARTICLE_CANONICAL_LINK__ __ARTICLE_CSS_LIST__ | ||
__CSS_LINKS__ __ARTICLE_JS_LIST__ | ||
</head> | ||
<body class="mediawiki mw-hide-empty-elt ns-0 ns-subject stable skin-minerva action-view animations"> | ||
<div id="mw-mf-viewport" class="feature-header-v2"> | ||
<div id="mw-mf-page-center"> | ||
<div id="content" class="mw-body"> | ||
<a id="top"></a> | ||
<div id="bodyContent" class="content mw-parser-output"> | ||
<h1 id="titleHeading" style="background-color: white; margin: 0;"></h1> | ||
<div id="mw-content-text"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
__ARTICLE_CONFIGVARS_LIST__ | ||
__JS_SCRIPTS__ | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
function importScript() { return 1 } // this is to avoid the error from site.js | ||
|
||
window.onload = function () { | ||
// Check if there is a Wikimedia mobile output page | ||
if (document.querySelector('#pcs')) { | ||
const supElements = document.querySelectorAll('sup'); | ||
const linkElements = document.querySelectorAll('a'); | ||
const disabledElems = Array.from(supElements).concat(Array.from(linkElements)) | ||
disabledElems.forEach((elem) => { | ||
elem.addEventListener('click', (event) => { | ||
event.stopPropagation(); | ||
}, true); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
body { | ||
margin: 0 auto !important; | ||
} | ||
p#pcs-edit-section-add-title-description { | ||
display: none !important; | ||
} | ||
span.noviewer { | ||
display: none !important; | ||
} | ||
.reference-link::after { | ||
content: none !important; | ||
} | ||
.mw-body h3, .mw-body h2 { | ||
width: auto; | ||
} | ||
|
||
.thumbinner img.pcs-widen-image-override { | ||
width: auto !important; | ||
max-width: 100% !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.