1
0
mirror of https://github.com/fumiama/copymanga.git synced 2026-07-02 00:30:25 +08:00
新增
1. 适配最新网址
This commit is contained in:
源文雨
2025-06-13 18:20:49 +09:00
parent 5285922602
commit eeb3735103
45 changed files with 231 additions and 146 deletions

2
.idea/compiler.xml generated
View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" /> <bytecodeTargetLevel target="17" />
</component> </component>
</project> </project>

8
.idea/dictionaries/default_user.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<component name="ProjectDictionaryState">
<dictionary name="default.user">
<words>
<w>ranobe</w>
<w>tabbar</w>
</words>
</dictionary>
</component>

5
.idea/gradle.xml generated
View File

@@ -4,16 +4,15 @@
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="11" /> <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" /> <option value="$PROJECT_DIR$/app" />
</set> </set>
</option> </option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>

6
.idea/kotlinc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="1.7.10" />
</component>
</project>

10
.idea/migrations.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

2
.idea/misc.xml generated
View File

@@ -32,7 +32,7 @@
</map> </map>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

2
app/.gitignore vendored
View File

@@ -1,2 +1,4 @@
/build /build
/release /release
/debug
/signing.properties

View File

@@ -1,17 +1,19 @@
apply plugin: 'com.android.application' plugins {
apply plugin: 'kotlin-android' id 'com.android.application'
apply plugin: 'kotlin-android-extensions' id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
}
android { android {
compileSdkVersion 32
buildToolsVersion "30.0.2"
defaultConfig { defaultConfig {
applicationId "top.fumiama.copymanga" compileSdk 34
applicationId "top.fumiama.copymangaweb"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 32 //noinspection OldTargetApi
versionCode 12 targetSdkVersion 34
versionName '1.4.3' versionCode 13
versionName '1.5.0'
resConfigs "zh", "zh-rCN" resConfigs "zh", "zh-rCN"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -19,27 +21,38 @@ android {
signingConfigs { signingConfigs {
release { release {
storeFile file('../../../OneDrive/swc/developer/android_key/open_key') enableV1Signing true
storePassword 'fumiama' enableV2Signing true
keyAlias 'default' enableV3Signing true
keyPassword 'fumiama' enableV4Signing true
v1SigningEnabled true }
v2SigningEnabled true debug {
enableV1Signing true
enableV2Signing true
enableV3Signing true
enableV4Signing true
} }
} }
buildTypes { buildTypes {
release { release {
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
vcsInfo.include false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
/*debug{ /*winrelease {r
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}*/ }*/
debug{
//minifyEnabled true
//shrinkResources true
//vcsInfo.include false
//proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
}
} }
compileOptions { compileOptions {
@@ -54,19 +67,43 @@ android {
viewBinding { viewBinding {
enabled = true enabled = true
} }
bundle{
density{
enableSplit = true
}
language{
enableSplit = false
}
}
namespace 'top.fumiama.copymangaweb'
}
Properties props = new Properties()
def propFile = file('signing.properties')
if (propFile.canRead()){
props.load(new FileInputStream(propFile))
if (props!=null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
android.signingConfigs.debug.storeFile = file(props['STORE_FILE'])
android.signingConfigs.debug.storePassword = props['STORE_PASSWORD']
android.signingConfigs.debug.keyAlias = props['KEY_ALIAS']
android.signingConfigs.debug.keyPassword = props['KEY_PASSWORD']
}
} }
dependencies { dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"]) implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.8.0' implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.viewpager2:viewpager2:1.0.0' implementation 'androidx.viewpager2:viewpager2:1.1.0'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
implementation 'com.github.bumptech.glide:glide:4.12.0' implementation 'com.github.bumptech.glide:glide:4.16.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
implementation 'com.google.code.gson:gson:2.8.9' implementation 'com.google.code.gson:gson:2.13.1'
} }

View File

@@ -44,7 +44,7 @@
#-keep class com.google.gson.stream.** { *; } #-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson # Application classes that will be serialized/deserialized over Gson
-keep public class top.fumiama.copymanga.data.* { *; } -keep public class top.fumiama.copymangaweb.data.* { *; }
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory, # Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) # JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga package top.fumiama.copymangaweb
import androidx.test.platform.app.InstrumentationRegistry import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="top.fumiama.copymanga">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />

View File

@@ -3,13 +3,19 @@ if (typeof (loaded) == "undefined") {
var loaded = true; var loaded = true;
var invoke = { var invoke = {
preUrl: "", preUrl: "",
hideRanobeTab: function () {
var tabs = document.getElementsByClassName("van-tabbar-item");
for (i = 0; i < tabs.length; i++) {
if (tabs[i].innerText == "輕小說") tabs[i].style = "display: none;";
}
},
hideRanobeRack: function () {
var tabs = document.getElementsByClassName("van-tabs van-tabs--line");
if (tabs.length) tabs[0].hidden = true;
},
pinTitle: function () { pinTitle: function () {
/*document.getElementsByClassName("van-button__content")[2].click();*/ var game = document.getElementsByName("exchange");
document.getElementsByClassName("indexTitle")[0].style.position = "fixed"; if (game.length) game[0].hidden = true;
document.getElementsByClassName("indexTitle")[0].style.zIndex = 999;
document.getElementsByClassName("indexTitle")[0].style.width = document.body.clientWidth - 18 + "px";
document.getElementsByClassName("copySwiper")[0].style.marginTop = "56px";
document.getElementsByClassName("indexTitle")[0].style.marginTop = "-56px";
}, },
notCallGM: function (url) { notCallGM: function (url) {
if (this.preUrl == url) return false; if (this.preUrl == url) return false;
@@ -35,10 +41,20 @@ if (typeof (loaded) == "undefined") {
function modify() { function modify() {
var url = location.href; var url = location.href;
GM.hideFab(); GM.hideFab();
if (url.endsWith("/index")) invoke.pinTitle(); if (url.endsWith("/index")) {
invoke.pinTitle();
invoke.hideRanobeTab();
}
else if (url.endsWith("/bookrack")) {
invoke.hideRanobeTab();
invoke.hideRanobeRack();
}
else if (url.indexOf("/comicContent/") > 0) setTimeout(function () { invoke.loadChapter() }, 1000); else if (url.indexOf("/comicContent/") > 0) setTimeout(function () { invoke.loadChapter() }, 1000);
else if (url.indexOf("/details/comic/") > 0) GM.loadComic(url); else if (url.indexOf("/details/comic/") > 0) GM.loadComic(url);
else if (url.indexOf("/personal") > 0) GM.enterProfile(); else if (url.indexOf("/personal") > 0) {
invoke.hideRanobeTab();
GM.enterProfile();
}
} }
modify(); modify();
invoke.urlChangeListener(modify); invoke.urlChangeListener(modify);

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.activity package top.fumiama.copymangaweb.activity
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.annotation.SuppressLint import android.annotation.SuppressLint
@@ -18,18 +18,18 @@ import kotlinx.android.synthetic.main.line_caption.view.*
import kotlinx.android.synthetic.main.line_horizonal.view.* import kotlinx.android.synthetic.main.line_horizonal.view.*
import kotlinx.android.synthetic.main.widget_downloadbar.* import kotlinx.android.synthetic.main.widget_downloadbar.*
import kotlinx.android.synthetic.main.widget_titlebar.* import kotlinx.android.synthetic.main.widget_titlebar.*
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import top.fumiama.copymanga.activity.MainActivity.Companion.mh import top.fumiama.copymangaweb.activity.MainActivity.Companion.mh
import top.fumiama.copymanga.data.ComicStructure import top.fumiama.copymangaweb.data.ComicStructure
import top.fumiama.copymanga.databinding.ActivityDlBinding import top.fumiama.copymangaweb.databinding.ActivityDlBinding
import top.fumiama.copymanga.handler.DlHandler import top.fumiama.copymangaweb.handler.DlHandler
import top.fumiama.copymanga.tool.MangaDlTools import top.fumiama.copymangaweb.tool.MangaDlTools
import top.fumiama.copymanga.tool.MangaDlTools.Companion.wmdlt import top.fumiama.copymangaweb.tool.MangaDlTools.Companion.wmdlt
import top.fumiama.copymanga.tool.ToolsBox import top.fumiama.copymangaweb.tool.ToolsBox
import top.fumiama.copymanga.view.ChapterToggleButton import top.fumiama.copymangaweb.view.ChapterToggleButton
import top.fumiama.copymanga.view.LazyScrollView import top.fumiama.copymangaweb.view.LazyScrollView
import top.fumiama.copymanga.web.JSHidden import top.fumiama.copymangaweb.web.JSHidden
import top.fumiama.copymanga.web.WebChromeClient import top.fumiama.copymangaweb.web.WebChromeClient
import java.io.File import java.io.File
import java.lang.Thread.sleep import java.lang.Thread.sleep
import java.lang.ref.WeakReference import java.lang.ref.WeakReference

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.activity package top.fumiama.copymangaweb.activity
import android.app.Activity import android.app.Activity
import android.app.AlertDialog import android.app.AlertDialog
@@ -9,9 +9,9 @@ import android.widget.ArrayAdapter
import android.widget.Toast import android.widget.Toast
import kotlinx.android.synthetic.main.activity_dlist.* import kotlinx.android.synthetic.main.activity_dlist.*
import kotlinx.android.synthetic.main.widget_titlebar.* import kotlinx.android.synthetic.main.widget_titlebar.*
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import top.fumiama.copymanga.databinding.ActivityDlistBinding import top.fumiama.copymangaweb.databinding.ActivityDlistBinding
import top.fumiama.copymanga.handler.DlLHandler import top.fumiama.copymangaweb.handler.DlLHandler
import java.io.File import java.io.File
import java.util.regex.Pattern import java.util.regex.Pattern
import java.util.zip.ZipInputStream import java.util.zip.ZipInputStream

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.activity package top.fumiama.copymangaweb.activity
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
@@ -10,15 +10,14 @@ import android.view.View
import android.webkit.ValueCallback import android.webkit.ValueCallback
import android.webkit.WebView import android.webkit.WebView
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import top.fumiama.copymanga.databinding.ActivityMainBinding import top.fumiama.copymangaweb.databinding.ActivityMainBinding
import top.fumiama.copymanga.handler.MainHandler import top.fumiama.copymangaweb.handler.MainHandler
import top.fumiama.copymanga.tool.SetDraggable import top.fumiama.copymangaweb.tool.SetDraggable
import top.fumiama.copymanga.tool.ToolsBox import top.fumiama.copymangaweb.tool.ToolsBox
import top.fumiama.copymanga.view.JSWebView import top.fumiama.copymangaweb.web.JS
import top.fumiama.copymanga.web.JS import top.fumiama.copymangaweb.web.JSHidden
import top.fumiama.copymanga.web.JSHidden import top.fumiama.copymangaweb.web.WebChromeClient
import top.fumiama.copymanga.web.WebChromeClient
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
class MainActivity: Activity() { class MainActivity: Activity() {

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.activity package top.fumiama.copymangaweb.activity
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.annotation.SuppressLint import android.annotation.SuppressLint
@@ -24,12 +24,12 @@ import kotlinx.android.synthetic.main.widget_infodrawer.*
import kotlinx.android.synthetic.main.widget_infodrawer.view.* import kotlinx.android.synthetic.main.widget_infodrawer.view.*
import kotlinx.android.synthetic.main.widget_titlebar.* import kotlinx.android.synthetic.main.widget_titlebar.*
import kotlinx.android.synthetic.main.widget_viewmangainfo.* import kotlinx.android.synthetic.main.widget_viewmangainfo.*
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import top.fumiama.copymanga.activity.MainActivity.Companion.wm import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
import top.fumiama.copymanga.databinding.ActivityViewmangaBinding import top.fumiama.copymangaweb.databinding.ActivityViewmangaBinding
import top.fumiama.copymanga.handler.TimeThread import top.fumiama.copymangaweb.handler.TimeThread
import top.fumiama.copymanga.tool.PropertiesTools import top.fumiama.copymangaweb.tool.PropertiesTools
import top.fumiama.copymanga.tool.ToolsBox import top.fumiama.copymangaweb.tool.ToolsBox
import java.io.File import java.io.File
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
import java.text.SimpleDateFormat import java.text.SimpleDateFormat

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.data; package top.fumiama.copymangaweb.data;
public class ComicStructure { public class ComicStructure {
public String name; public String name;

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.handler package top.fumiama.copymangaweb.handler
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.os.Handler import android.os.Handler
@@ -7,9 +7,9 @@ import android.os.Message
import android.widget.Toast import android.widget.Toast
import android.widget.ToggleButton import android.widget.ToggleButton
import kotlinx.android.synthetic.main.widget_downloadbar.* import kotlinx.android.synthetic.main.widget_downloadbar.*
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import top.fumiama.copymanga.activity.DlActivity import top.fumiama.copymangaweb.activity.DlActivity
import top.fumiama.copymanga.tool.MangaDlTools.Companion.wmdlt import top.fumiama.copymangaweb.tool.MangaDlTools.Companion.wmdlt
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
class DlHandler(activity: DlActivity, looper: Looper) : Handler(looper) { class DlHandler(activity: DlActivity, looper: Looper) : Handler(looper) {

View File

@@ -1,9 +1,9 @@
package top.fumiama.copymanga.handler package top.fumiama.copymangaweb.handler
import android.os.Handler import android.os.Handler
import android.os.Looper import android.os.Looper
import android.os.Message import android.os.Message
import top.fumiama.copymanga.activity.DlListActivity import top.fumiama.copymangaweb.activity.DlListActivity
import java.io.File import java.io.File
import java.lang.ref.WeakReference import java.lang.ref.WeakReference

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.handler package top.fumiama.copymangaweb.handler
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.content.Intent import android.content.Intent
@@ -7,10 +7,10 @@ import android.os.Looper
import android.os.Message import android.os.Message
import android.view.View import android.view.View
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import top.fumiama.copymanga.activity.DlActivity.Companion.json import top.fumiama.copymangaweb.activity.DlActivity.Companion.json
import top.fumiama.copymanga.activity.MainActivity.Companion.wm import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
import top.fumiama.copymanga.activity.ViewMangaActivity import top.fumiama.copymangaweb.activity.ViewMangaActivity
import top.fumiama.copymanga.tool.MangaDlTools.Companion.wmdlt import top.fumiama.copymangaweb.tool.MangaDlTools.Companion.wmdlt
class MainHandler(looper: Looper):Handler(looper) { class MainHandler(looper: Looper):Handler(looper) {
var saveUrlsOnly = false var saveUrlsOnly = false

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.handler package top.fumiama.copymangaweb.handler
import android.os.Handler import android.os.Handler

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.tool package top.fumiama.copymangaweb.tool
import android.util.Log import android.util.Log
import java.net.HttpURLConnection import java.net.HttpURLConnection

View File

@@ -1,7 +1,7 @@
package top.fumiama.copymanga.tool package top.fumiama.copymangaweb.tool
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import top.fumiama.copymanga.activity.DlActivity import top.fumiama.copymangaweb.activity.DlActivity
import kotlinx.android.synthetic.main.activity_dl.* import kotlinx.android.synthetic.main.activity_dl.*
import java.io.File import java.io.File
import java.lang.Thread.sleep import java.lang.Thread.sleep

View File

@@ -1,10 +1,10 @@
package top.fumiama.copymanga.tool package top.fumiama.copymangaweb.tool
import android.content.Intent import android.content.Intent
import android.widget.Toast import android.widget.Toast
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import top.fumiama.copymanga.activity.MainActivity.Companion.wm import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
import top.fumiama.copymanga.activity.ViewMangaActivity import top.fumiama.copymangaweb.activity.ViewMangaActivity
import java.io.File import java.io.File
import java.lang.ref.WeakReference import java.lang.ref.WeakReference

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.tool package top.fumiama.copymangaweb.tool
//PropertiesTools.kt //PropertiesTools.kt
//created by fumiama 20200724 //created by fumiama 20200724
import android.util.Log import android.util.Log

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.tool package top.fumiama.copymangaweb.tool
import android.content.Context import android.content.Context
import android.view.MotionEvent import android.view.MotionEvent

View File

@@ -1,16 +1,14 @@
package top.fumiama.copymanga.tool package top.fumiama.copymangaweb.tool
import android.app.Activity import android.app.Activity
import android.app.AlertDialog import android.app.AlertDialog
import android.content.Context import android.content.Context
import android.net.ConnectivityManager import android.net.ConnectivityManager
import android.net.NetworkCapabilities import android.net.NetworkCapabilities
import android.util.Log
import android.widget.Toast import android.widget.Toast
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
import java.util.* import java.util.*
import java.util.regex.Pattern
import kotlin.math.sqrt import kotlin.math.sqrt
class ToolsBox(w: WeakReference<Any>) { class ToolsBox(w: WeakReference<Any>) {

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.view package top.fumiama.copymangaweb.view
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet

View File

@@ -1,12 +1,11 @@
package top.fumiama.copymanga.view package top.fumiama.copymangaweb.view
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.util.Log import android.util.Log
import android.webkit.WebView import android.webkit.WebView
import top.fumiama.copymanga.web.WebViewClient import top.fumiama.copymangaweb.web.WebViewClient
import kotlin.reflect.KClass
@SuppressLint("JavascriptInterface") @SuppressLint("JavascriptInterface")
class JSWebView : WebView { class JSWebView : WebView {

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.view package top.fumiama.copymangaweb.view
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.view package top.fumiama.copymangaweb.view
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.animation.ValueAnimator.AnimatorUpdateListener import android.animation.ValueAnimator.AnimatorUpdateListener
@@ -14,8 +14,8 @@ import android.view.GestureDetector
import android.view.GestureDetector.SimpleOnGestureListener import android.view.GestureDetector.SimpleOnGestureListener
import android.view.MotionEvent import android.view.MotionEvent
import android.widget.ImageView import android.widget.ImageView
import top.fumiama.copymanga.activity.ViewMangaActivity import top.fumiama.copymangaweb.activity.ViewMangaActivity
import top.fumiama.copymanga.tool.PagesManager import top.fumiama.copymangaweb.tool.PagesManager
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
import java.util.* import java.util.*
import kotlin.math.sqrt import kotlin.math.sqrt
@@ -643,7 +643,7 @@ class ScaleImageView : ImageView {
private val mGestureDetector = private val mGestureDetector =
GestureDetector(this.context, object : SimpleOnGestureListener() { GestureDetector(this.context, object : SimpleOnGestureListener() {
override fun onFling( override fun onFling(
e1: MotionEvent, e1: MotionEvent?,
e2: MotionEvent, e2: MotionEvent,
velocityX: Float, velocityX: Float,
velocityY: Float velocityY: Float

View File

@@ -1,11 +1,10 @@
package top.fumiama.copymanga.web package top.fumiama.copymangaweb.web
import android.util.Log import android.util.Log
import android.webkit.JavascriptInterface import android.webkit.JavascriptInterface
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import top.fumiama.copymanga.activity.MainActivity.Companion.mh import top.fumiama.copymangaweb.activity.MainActivity.Companion.mh
import top.fumiama.copymanga.activity.MainActivity.Companion.wm import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
import top.fumiama.copymanga.activity.ViewMangaActivity
class JS { class JS {
@JavascriptInterface @JavascriptInterface

View File

@@ -1,9 +1,9 @@
package top.fumiama.copymanga.web package top.fumiama.copymangaweb.web
import android.util.Log import android.util.Log
import android.webkit.JavascriptInterface import android.webkit.JavascriptInterface
import top.fumiama.copymanga.activity.DlActivity import top.fumiama.copymangaweb.activity.DlActivity
import top.fumiama.copymanga.activity.MainActivity.Companion.mh import top.fumiama.copymangaweb.activity.MainActivity.Companion.mh
class JSHidden { class JSHidden {
@JavascriptInterface @JavascriptInterface

View File

@@ -1,10 +1,10 @@
package top.fumiama.copymanga.web package top.fumiama.copymangaweb.web
import android.net.Uri import android.net.Uri
import android.webkit.* import android.webkit.*
import android.webkit.WebChromeClient import android.webkit.WebChromeClient
import top.fumiama.copymanga.activity.MainActivity.Companion.mh import top.fumiama.copymangaweb.activity.MainActivity.Companion.mh
import top.fumiama.copymanga.activity.MainActivity.Companion.wm import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
class WebChromeClient:WebChromeClient() { class WebChromeClient:WebChromeClient() {
override fun onProgressChanged(view: WebView?, newProgress: Int) { override fun onProgressChanged(view: WebView?, newProgress: Int) {

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga.web package top.fumiama.copymangaweb.web
import android.content.Context import android.content.Context
import android.graphics.Bitmap import android.graphics.Bitmap
@@ -7,9 +7,8 @@ import android.util.Log
import android.webkit.* import android.webkit.*
import android.webkit.WebViewClient import android.webkit.WebViewClient
import android.widget.Toast import android.widget.Toast
import top.fumiama.copymanga.R import top.fumiama.copymangaweb.R
import top.fumiama.copymanga.activity.MainActivity.Companion.mh import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
import top.fumiama.copymanga.activity.MainActivity.Companion.wm
class WebViewClient(private val context: Context, jsFileName: String):WebViewClient() { class WebViewClient(private val context: Context, jsFileName: String):WebViewClient() {
private val js = context.assets.open(jsFileName).readBytes().decodeToString() private val js = context.assets.open(jsFileName).readBytes().decodeToString()

View File

@@ -5,7 +5,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#FCFCFF"> android:background="#FCFCFF">
<top.fumiama.copymanga.view.JSWebView <top.fumiama.copymangaweb.view.JSWebView
android:id="@+id/dwh" android:id="@+id/dwh"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -24,7 +24,7 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<top.fumiama.copymanga.view.LazyScrollView <top.fumiama.copymangaweb.view.LazyScrollView
android:id="@+id/dllazys" android:id="@+id/dllazys"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
@@ -47,7 +47,7 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</LinearLayout> </LinearLayout>
</top.fumiama.copymanga.view.LazyScrollView> </top.fumiama.copymangaweb.view.LazyScrollView>
<include <include
layout="@layout/widget_downloadbar" layout="@layout/widget_downloadbar"

View File

@@ -5,12 +5,12 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<top.fumiama.copymanga.view.JSWebView <top.fumiama.copymangaweb.view.JSWebView
android:id="@+id/wh" android:id="@+id/wh"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<top.fumiama.copymanga.view.JSWebView <top.fumiama.copymangaweb.view.JSWebView
android:id="@+id/w" android:id="@+id/w"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<top.fumiama.copymanga.view.ChapterToggleButton <top.fumiama.copymangaweb.view.ChapterToggleButton
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"

View File

@@ -6,7 +6,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<top.fumiama.copymanga.view.ScaleImageView <top.fumiama.copymangaweb.view.ScaleImageView
android:id="@+id/onei" android:id="@+id/onei"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

View File

@@ -1,8 +1,8 @@
<resources> <resources>
<string name="app_name">拷贝漫画</string> <string name="app_name">拷贝漫画</string>
<string name="web_home">https://copymanga.net/h5/init</string> <string name="web_home">https://www.copy20.com</string>
<string name="web_home_www">https://www.copymanga.net</string> <string name="web_home_www">https://www.copy20.com</string>
<string name="web_comic_detail_pc">https://www.copymanga.net/comic</string> <string name="web_comic_detail_pc">https://www.copy20.com/comic</string>
<string name="pc_ua">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36 Edg/86.0.622.38</string> <string name="pc_ua">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36 Edg/86.0.622.38</string>

View File

@@ -1,4 +1,4 @@
package top.fumiama.copymanga package top.fumiama.copymangaweb
import org.junit.Test import org.junit.Test

View File

@@ -1,12 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.5.31' ext.kotlin_version = "$cm_kotlin_version"
repositories { repositories {
gradlePluginPortal()
google() google()
jcenter() mavenCentral()
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.0.3' classpath 'com.android.tools.build:gradle:8.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
@@ -17,10 +20,11 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
maven { url "https://jitpack.io" }
} }
} }
task clean(type: Delete) { tasks.register('clean', Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

View File

@@ -20,3 +20,7 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
android.enableR8.fullMode=true android.enableR8.fullMode=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
cm_kotlin_version=1.7.10

View File

@@ -1,6 +1,6 @@
#Wed Oct 14 16:47:38 CST 2020 #Fri Sep 04 18:15:43 CST 2020
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip

View File

@@ -1,2 +1,8 @@
pluginManagement {
plugins {
id 'kotlin-android' version "$cm_kotlin_version"
}
}
include ':app' include ':app'
rootProject.name = "拷贝漫画" rootProject.name = "拷贝漫画"