...
This commit is contained in:
parent
764025f1e7
commit
c80e173ad9
@ -208,11 +208,13 @@ if (document.querySelector(".show_viewer") !== null) {
|
|||||||
sendMessage({type: "SHOWVIEWER"});
|
sendMessage({type: "SHOWVIEWER"});
|
||||||
}
|
}
|
||||||
if(document.querySelector(".list-body") !== null) {
|
if(document.querySelector(".list-body") !== null) {
|
||||||
|
removeSpecificGifs()
|
||||||
var listBody = null
|
var listBody = null
|
||||||
try {listBody = document.querySelector(".list-body");}catch (e) {}
|
try {listBody = document.querySelector(".list-body");}catch (e) {}
|
||||||
getList(listBody.children)
|
getList(listBody.children)
|
||||||
}
|
}
|
||||||
if(document.querySelector("#novel_content") !== null){
|
if(document.querySelector("#novel_content") !== null){
|
||||||
|
removeSpecificGifs()
|
||||||
var title = null
|
var title = null
|
||||||
var contents = null
|
var contents = null
|
||||||
try {title = toonTitle(document.querySelector(".page-desc")); }catch (e) {}
|
try {title = toonTitle(document.querySelector(".page-desc")); }catch (e) {}
|
||||||
@ -236,6 +238,16 @@ if(document.querySelector("#html_encoder_div")) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
function removeSpecificGifs() {
|
||||||
|
const images = document.getElementsByTagName('img');
|
||||||
|
for (let i = images.length - 1; i >= 0; i--) {
|
||||||
|
const src = images[i].src;
|
||||||
|
// 요청하신 특정 도메인과 gif 패턴, 쿼리 파라미터를 체크
|
||||||
|
if (src.includes('tokinbtoki') && src.includes('.gif') && src.includes('_=')) {
|
||||||
|
images[i].parentNode.removeChild(images[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getList(children) {
|
function getList(children) {
|
||||||
// port.postMessage("Start of getList!" + children);
|
// port.postMessage("Start of getList!" + children);
|
||||||
|
|||||||
@ -1222,7 +1222,7 @@ class TokiFragment : Fragment(), PagedTextViewInterface {
|
|||||||
throw RuntimeException(ex)
|
throw RuntimeException(ex)
|
||||||
}
|
}
|
||||||
mPort?.postMessage(message)
|
mPort?.postMessage(message)
|
||||||
Blog.LOGD(log = "Successfully opened realm: ${realm.configuration.name}")
|
// Blog.LOGD(log = "Successfully opened realm: ${realm.configuration.name}")
|
||||||
}
|
}
|
||||||
private fun sendViewerTouch(string: String) {
|
private fun sendViewerTouch(string: String) {
|
||||||
val message: JSONObject = JSONObject()
|
val message: JSONObject = JSONObject()
|
||||||
|
|||||||
@ -288,18 +288,18 @@ class PagedTextLayout : ConstraintLayout , PagedTextGenerateInterface {
|
|||||||
|
|
||||||
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
|
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
|
||||||
super.onLayout(changed, left, top, right, bottom)
|
super.onLayout(changed, left, top, right, bottom)
|
||||||
Blog.LOGD(log = "onLayout>> ${this::class.java.name} changed >> ${changed}")
|
// Blog.LOGD(log = "onLayout>> ${this::class.java.name} changed >> ${changed}")
|
||||||
if(changed) {
|
if(changed) {
|
||||||
// forceUpdateUI()
|
// forceUpdateUI()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||||
super.onSizeChanged(w, h, oldw, oldh)
|
super.onSizeChanged(w, h, oldw, oldh)
|
||||||
Blog.LOGD(log = "onSizeChanged>> ${this::class.java.name}")
|
// Blog.LOGD(log = "onSizeChanged>> ${this::class.java.name}")
|
||||||
if (w != oldw || oldh != h) {
|
if (w != oldw || oldh != h) {
|
||||||
postDelayed(Runnable {
|
postDelayed(Runnable {
|
||||||
layoutChange(w > (h * 0.7f))
|
layoutChange(w > (h * 0.7f))
|
||||||
Blog.LOGD(log = "onSizeChanged>> ${w} ${h} ${h * 0.7}")
|
// Blog.LOGD(log = "onSizeChanged>> ${w} ${h} ${h * 0.7}")
|
||||||
},20)
|
},20)
|
||||||
}else {
|
}else {
|
||||||
|
|
||||||
@ -344,7 +344,7 @@ class PagedTextLayout : ConstraintLayout , PagedTextGenerateInterface {
|
|||||||
if (pageList.size > 0) {
|
if (pageList.size > 0) {
|
||||||
this@PagedTextLayout.currentPage = num
|
this@PagedTextLayout.currentPage = num
|
||||||
var realPage = if (isDualPage()) this@PagedTextLayout.currentPage * 2 else this@PagedTextLayout.currentPage
|
var realPage = if (isDualPage()) this@PagedTextLayout.currentPage * 2 else this@PagedTextLayout.currentPage
|
||||||
Blog.LOGE("realPage = if(${pageList?.size} ?: 0 > ${realPage}) { realPage} else { ${(pageList?.size ?: 0) - 1}}")
|
// Blog.LOGE("realPage = if(${pageList?.size} ?: 0 > ${realPage}) { realPage} else { ${(pageList?.size ?: 0) - 1}}")
|
||||||
realPage = if (pageList?.size ?: 0 > realPage) {
|
realPage = if (pageList?.size ?: 0 > realPage) {
|
||||||
realPage
|
realPage
|
||||||
} else {
|
} else {
|
||||||
@ -353,7 +353,7 @@ class PagedTextLayout : ConstraintLayout , PagedTextGenerateInterface {
|
|||||||
currentPageTextView?.text = "${realPage + 1}/${pageList?.size ?: 0 + 1}"
|
currentPageTextView?.text = "${realPage + 1}/${pageList?.size ?: 0 + 1}"
|
||||||
|
|
||||||
mainTextView?.text = pageList?.get(realPage) ?: "NONE"
|
mainTextView?.text = pageList?.get(realPage) ?: "NONE"
|
||||||
Blog.LOGE("pageList.get($realPage) ${pageList?.get(realPage)}")
|
// Blog.LOGE("pageList.get($realPage) ${pageList?.get(realPage)}")
|
||||||
if (isDualPage()) {
|
if (isDualPage()) {
|
||||||
realPage = realPage.inc()
|
realPage = realPage.inc()
|
||||||
sencondTextView?.text = if (pageList?.size ?: 0 > realPage) {
|
sencondTextView?.text = if (pageList?.size ?: 0 > realPage) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user