mirror of
https://github.com/fumiama/copymanga.git
synced 2026-06-09 01:10:28 +08:00
v1.5.0
新增 1. 适配最新网址
This commit is contained in:
2
.idea/compiler.xml
generated
2
.idea/compiler.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="11" />
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/dictionaries/default_user.xml
generated
Normal file
8
.idea/dictionaries/default_user.xml
generated
Normal 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
5
.idea/gradle.xml
generated
@@ -4,16 +4,15 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="11" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
6
.idea/kotlinc.xml
generated
Normal file
6
.idea/kotlinc.xml
generated
Normal 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
10
.idea/migrations.xml
generated
Normal 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
2
.idea/misc.xml
generated
@@ -32,7 +32,7 @@
|
||||
</map>
|
||||
</option>
|
||||
</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" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
4
app/.gitignore
vendored
4
app/.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
/build
|
||||
/release
|
||||
/release
|
||||
/debug
|
||||
/signing.properties
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'kotlin-kapt'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 32
|
||||
buildToolsVersion "30.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "top.fumiama.copymanga"
|
||||
compileSdk 34
|
||||
applicationId "top.fumiama.copymangaweb"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 32
|
||||
versionCode 12
|
||||
versionName '1.4.3'
|
||||
//noinspection OldTargetApi
|
||||
targetSdkVersion 34
|
||||
versionCode 13
|
||||
versionName '1.5.0'
|
||||
resConfigs "zh", "zh-rCN"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -19,27 +21,38 @@ android {
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file('../../../OneDrive/swc/developer/android_key/open_key')
|
||||
storePassword 'fumiama'
|
||||
keyAlias 'default'
|
||||
keyPassword 'fumiama'
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
enableV1Signing true
|
||||
enableV2Signing true
|
||||
enableV3Signing true
|
||||
enableV4Signing true
|
||||
}
|
||||
debug {
|
||||
enableV1Signing true
|
||||
enableV2Signing true
|
||||
enableV3Signing true
|
||||
enableV4Signing true
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
vcsInfo.include false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
/*debug{
|
||||
/*winrelease {r
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
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 {
|
||||
@@ -54,19 +67,43 @@ android {
|
||||
viewBinding {
|
||||
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 {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
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.viewpager2:viewpager2:1.0.0'
|
||||
implementation 'androidx.viewpager2:viewpager2:1.1.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.9'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
||||
implementation 'com.github.bumptech.glide:glide:4.16.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
|
||||
implementation 'com.google.code.gson:gson:2.13.1'
|
||||
}
|
||||
|
||||
2
app/proguard-rules.pro
vendored
2
app/proguard-rules.pro
vendored
@@ -44,7 +44,7 @@
|
||||
#-keep class com.google.gson.stream.** { *; }
|
||||
|
||||
# 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,
|
||||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga
|
||||
package top.fumiama.copymangaweb
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
@@ -1,5 +1,4 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="top.fumiama.copymanga">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
@@ -3,13 +3,19 @@ if (typeof (loaded) == "undefined") {
|
||||
var loaded = true;
|
||||
var invoke = {
|
||||
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 () {
|
||||
/*document.getElementsByClassName("van-button__content")[2].click();*/
|
||||
document.getElementsByClassName("indexTitle")[0].style.position = "fixed";
|
||||
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";
|
||||
var game = document.getElementsByName("exchange");
|
||||
if (game.length) game[0].hidden = true;
|
||||
},
|
||||
notCallGM: function (url) {
|
||||
if (this.preUrl == url) return false;
|
||||
@@ -35,10 +41,20 @@ if (typeof (loaded) == "undefined") {
|
||||
function modify() {
|
||||
var url = location.href;
|
||||
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("/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();
|
||||
invoke.urlChangeListener(modify);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.activity
|
||||
package top.fumiama.copymangaweb.activity
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
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.widget_downloadbar.*
|
||||
import kotlinx.android.synthetic.main.widget_titlebar.*
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.mh
|
||||
import top.fumiama.copymanga.data.ComicStructure
|
||||
import top.fumiama.copymanga.databinding.ActivityDlBinding
|
||||
import top.fumiama.copymanga.handler.DlHandler
|
||||
import top.fumiama.copymanga.tool.MangaDlTools
|
||||
import top.fumiama.copymanga.tool.MangaDlTools.Companion.wmdlt
|
||||
import top.fumiama.copymanga.tool.ToolsBox
|
||||
import top.fumiama.copymanga.view.ChapterToggleButton
|
||||
import top.fumiama.copymanga.view.LazyScrollView
|
||||
import top.fumiama.copymanga.web.JSHidden
|
||||
import top.fumiama.copymanga.web.WebChromeClient
|
||||
import top.fumiama.copymangaweb.R
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.mh
|
||||
import top.fumiama.copymangaweb.data.ComicStructure
|
||||
import top.fumiama.copymangaweb.databinding.ActivityDlBinding
|
||||
import top.fumiama.copymangaweb.handler.DlHandler
|
||||
import top.fumiama.copymangaweb.tool.MangaDlTools
|
||||
import top.fumiama.copymangaweb.tool.MangaDlTools.Companion.wmdlt
|
||||
import top.fumiama.copymangaweb.tool.ToolsBox
|
||||
import top.fumiama.copymangaweb.view.ChapterToggleButton
|
||||
import top.fumiama.copymangaweb.view.LazyScrollView
|
||||
import top.fumiama.copymangaweb.web.JSHidden
|
||||
import top.fumiama.copymangaweb.web.WebChromeClient
|
||||
import java.io.File
|
||||
import java.lang.Thread.sleep
|
||||
import java.lang.ref.WeakReference
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.activity
|
||||
package top.fumiama.copymangaweb.activity
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
@@ -9,9 +9,9 @@ import android.widget.ArrayAdapter
|
||||
import android.widget.Toast
|
||||
import kotlinx.android.synthetic.main.activity_dlist.*
|
||||
import kotlinx.android.synthetic.main.widget_titlebar.*
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymanga.databinding.ActivityDlistBinding
|
||||
import top.fumiama.copymanga.handler.DlLHandler
|
||||
import top.fumiama.copymangaweb.R
|
||||
import top.fumiama.copymangaweb.databinding.ActivityDlistBinding
|
||||
import top.fumiama.copymangaweb.handler.DlLHandler
|
||||
import java.io.File
|
||||
import java.util.regex.Pattern
|
||||
import java.util.zip.ZipInputStream
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.activity
|
||||
package top.fumiama.copymangaweb.activity
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
@@ -10,15 +10,14 @@ import android.view.View
|
||||
import android.webkit.ValueCallback
|
||||
import android.webkit.WebView
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymanga.databinding.ActivityMainBinding
|
||||
import top.fumiama.copymanga.handler.MainHandler
|
||||
import top.fumiama.copymanga.tool.SetDraggable
|
||||
import top.fumiama.copymanga.tool.ToolsBox
|
||||
import top.fumiama.copymanga.view.JSWebView
|
||||
import top.fumiama.copymanga.web.JS
|
||||
import top.fumiama.copymanga.web.JSHidden
|
||||
import top.fumiama.copymanga.web.WebChromeClient
|
||||
import top.fumiama.copymangaweb.R
|
||||
import top.fumiama.copymangaweb.databinding.ActivityMainBinding
|
||||
import top.fumiama.copymangaweb.handler.MainHandler
|
||||
import top.fumiama.copymangaweb.tool.SetDraggable
|
||||
import top.fumiama.copymangaweb.tool.ToolsBox
|
||||
import top.fumiama.copymangaweb.web.JS
|
||||
import top.fumiama.copymangaweb.web.JSHidden
|
||||
import top.fumiama.copymangaweb.web.WebChromeClient
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
class MainActivity: Activity() {
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.activity
|
||||
package top.fumiama.copymangaweb.activity
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
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_titlebar.*
|
||||
import kotlinx.android.synthetic.main.widget_viewmangainfo.*
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymanga.databinding.ActivityViewmangaBinding
|
||||
import top.fumiama.copymanga.handler.TimeThread
|
||||
import top.fumiama.copymanga.tool.PropertiesTools
|
||||
import top.fumiama.copymanga.tool.ToolsBox
|
||||
import top.fumiama.copymangaweb.R
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymangaweb.databinding.ActivityViewmangaBinding
|
||||
import top.fumiama.copymangaweb.handler.TimeThread
|
||||
import top.fumiama.copymangaweb.tool.PropertiesTools
|
||||
import top.fumiama.copymangaweb.tool.ToolsBox
|
||||
import java.io.File
|
||||
import java.lang.ref.WeakReference
|
||||
import java.text.SimpleDateFormat
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.data;
|
||||
package top.fumiama.copymangaweb.data;
|
||||
|
||||
public class ComicStructure {
|
||||
public String name;
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.handler
|
||||
package top.fumiama.copymangaweb.handler
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Handler
|
||||
@@ -7,9 +7,9 @@ import android.os.Message
|
||||
import android.widget.Toast
|
||||
import android.widget.ToggleButton
|
||||
import kotlinx.android.synthetic.main.widget_downloadbar.*
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymanga.activity.DlActivity
|
||||
import top.fumiama.copymanga.tool.MangaDlTools.Companion.wmdlt
|
||||
import top.fumiama.copymangaweb.R
|
||||
import top.fumiama.copymangaweb.activity.DlActivity
|
||||
import top.fumiama.copymangaweb.tool.MangaDlTools.Companion.wmdlt
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
class DlHandler(activity: DlActivity, looper: Looper) : Handler(looper) {
|
||||
@@ -1,9 +1,9 @@
|
||||
package top.fumiama.copymanga.handler
|
||||
package top.fumiama.copymangaweb.handler
|
||||
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import top.fumiama.copymanga.activity.DlListActivity
|
||||
import top.fumiama.copymangaweb.activity.DlListActivity
|
||||
import java.io.File
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.handler
|
||||
package top.fumiama.copymangaweb.handler
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Intent
|
||||
@@ -7,10 +7,10 @@ import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.view.View
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import top.fumiama.copymanga.activity.DlActivity.Companion.json
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymanga.activity.ViewMangaActivity
|
||||
import top.fumiama.copymanga.tool.MangaDlTools.Companion.wmdlt
|
||||
import top.fumiama.copymangaweb.activity.DlActivity.Companion.json
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymangaweb.activity.ViewMangaActivity
|
||||
import top.fumiama.copymangaweb.tool.MangaDlTools.Companion.wmdlt
|
||||
|
||||
class MainHandler(looper: Looper):Handler(looper) {
|
||||
var saveUrlsOnly = false
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.handler
|
||||
package top.fumiama.copymangaweb.handler
|
||||
|
||||
import android.os.Handler
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.tool
|
||||
package top.fumiama.copymangaweb.tool
|
||||
|
||||
import android.util.Log
|
||||
import java.net.HttpURLConnection
|
||||
@@ -1,7 +1,7 @@
|
||||
package top.fumiama.copymanga.tool
|
||||
package top.fumiama.copymangaweb.tool
|
||||
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymanga.activity.DlActivity
|
||||
import top.fumiama.copymangaweb.R
|
||||
import top.fumiama.copymangaweb.activity.DlActivity
|
||||
import kotlinx.android.synthetic.main.activity_dl.*
|
||||
import java.io.File
|
||||
import java.lang.Thread.sleep
|
||||
@@ -1,10 +1,10 @@
|
||||
package top.fumiama.copymanga.tool
|
||||
package top.fumiama.copymangaweb.tool
|
||||
|
||||
import android.content.Intent
|
||||
import android.widget.Toast
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymanga.activity.ViewMangaActivity
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymangaweb.activity.ViewMangaActivity
|
||||
import java.io.File
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.tool
|
||||
package top.fumiama.copymangaweb.tool
|
||||
//PropertiesTools.kt
|
||||
//created by fumiama 20200724
|
||||
import android.util.Log
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.tool
|
||||
package top.fumiama.copymangaweb.tool
|
||||
|
||||
import android.content.Context
|
||||
import android.view.MotionEvent
|
||||
@@ -1,16 +1,14 @@
|
||||
package top.fumiama.copymanga.tool
|
||||
package top.fumiama.copymangaweb.tool
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import android.content.Context
|
||||
import android.net.ConnectivityManager
|
||||
import android.net.NetworkCapabilities
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymangaweb.R
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.*
|
||||
import java.util.regex.Pattern
|
||||
import kotlin.math.sqrt
|
||||
|
||||
class ToolsBox(w: WeakReference<Any>) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.view
|
||||
package top.fumiama.copymangaweb.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
@@ -1,12 +1,11 @@
|
||||
package top.fumiama.copymanga.view
|
||||
package top.fumiama.copymangaweb.view
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.webkit.WebView
|
||||
import top.fumiama.copymanga.web.WebViewClient
|
||||
import kotlin.reflect.KClass
|
||||
import top.fumiama.copymangaweb.web.WebViewClient
|
||||
|
||||
@SuppressLint("JavascriptInterface")
|
||||
class JSWebView : WebView {
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.view
|
||||
package top.fumiama.copymangaweb.view
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.view
|
||||
package top.fumiama.copymangaweb.view
|
||||
|
||||
import android.animation.ValueAnimator
|
||||
import android.animation.ValueAnimator.AnimatorUpdateListener
|
||||
@@ -14,8 +14,8 @@ import android.view.GestureDetector
|
||||
import android.view.GestureDetector.SimpleOnGestureListener
|
||||
import android.view.MotionEvent
|
||||
import android.widget.ImageView
|
||||
import top.fumiama.copymanga.activity.ViewMangaActivity
|
||||
import top.fumiama.copymanga.tool.PagesManager
|
||||
import top.fumiama.copymangaweb.activity.ViewMangaActivity
|
||||
import top.fumiama.copymangaweb.tool.PagesManager
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.*
|
||||
import kotlin.math.sqrt
|
||||
@@ -643,7 +643,7 @@ class ScaleImageView : ImageView {
|
||||
private val mGestureDetector =
|
||||
GestureDetector(this.context, object : SimpleOnGestureListener() {
|
||||
override fun onFling(
|
||||
e1: MotionEvent,
|
||||
e1: MotionEvent?,
|
||||
e2: MotionEvent,
|
||||
velocityX: Float,
|
||||
velocityY: Float
|
||||
@@ -1,11 +1,10 @@
|
||||
package top.fumiama.copymanga.web
|
||||
package top.fumiama.copymangaweb.web
|
||||
|
||||
import android.util.Log
|
||||
import android.webkit.JavascriptInterface
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.mh
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymanga.activity.ViewMangaActivity
|
||||
import top.fumiama.copymangaweb.R
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.mh
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
|
||||
|
||||
class JS {
|
||||
@JavascriptInterface
|
||||
@@ -1,9 +1,9 @@
|
||||
package top.fumiama.copymanga.web
|
||||
package top.fumiama.copymangaweb.web
|
||||
|
||||
import android.util.Log
|
||||
import android.webkit.JavascriptInterface
|
||||
import top.fumiama.copymanga.activity.DlActivity
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.mh
|
||||
import top.fumiama.copymangaweb.activity.DlActivity
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.mh
|
||||
|
||||
class JSHidden {
|
||||
@JavascriptInterface
|
||||
@@ -1,10 +1,10 @@
|
||||
package top.fumiama.copymanga.web
|
||||
package top.fumiama.copymangaweb.web
|
||||
|
||||
import android.net.Uri
|
||||
import android.webkit.*
|
||||
import android.webkit.WebChromeClient
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.mh
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.mh
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
|
||||
|
||||
class WebChromeClient:WebChromeClient() {
|
||||
override fun onProgressChanged(view: WebView?, newProgress: Int) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga.web
|
||||
package top.fumiama.copymangaweb.web
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
@@ -7,9 +7,8 @@ import android.util.Log
|
||||
import android.webkit.*
|
||||
import android.webkit.WebViewClient
|
||||
import android.widget.Toast
|
||||
import top.fumiama.copymanga.R
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.mh
|
||||
import top.fumiama.copymanga.activity.MainActivity.Companion.wm
|
||||
import top.fumiama.copymangaweb.R
|
||||
import top.fumiama.copymangaweb.activity.MainActivity.Companion.wm
|
||||
|
||||
class WebViewClient(private val context: Context, jsFileName: String):WebViewClient() {
|
||||
private val js = context.assets.open(jsFileName).readBytes().decodeToString()
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FCFCFF">
|
||||
|
||||
<top.fumiama.copymanga.view.JSWebView
|
||||
<top.fumiama.copymangaweb.view.JSWebView
|
||||
android:id="@+id/dwh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -24,7 +24,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<top.fumiama.copymanga.view.LazyScrollView
|
||||
<top.fumiama.copymangaweb.view.LazyScrollView
|
||||
android:id="@+id/dllazys"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
@@ -47,7 +47,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</LinearLayout>
|
||||
</top.fumiama.copymanga.view.LazyScrollView>
|
||||
</top.fumiama.copymangaweb.view.LazyScrollView>
|
||||
|
||||
<include
|
||||
layout="@layout/widget_downloadbar"
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<top.fumiama.copymanga.view.JSWebView
|
||||
<top.fumiama.copymangaweb.view.JSWebView
|
||||
android:id="@+id/wh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<top.fumiama.copymanga.view.JSWebView
|
||||
<top.fumiama.copymangaweb.view.JSWebView
|
||||
android:id="@+id/w"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?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:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<top.fumiama.copymanga.view.ScaleImageView
|
||||
<top.fumiama.copymangaweb.view.ScaleImageView
|
||||
android:id="@+id/onei"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<resources>
|
||||
<string name="app_name">拷贝漫画</string>
|
||||
<string name="web_home">https://copymanga.net/h5/init</string>
|
||||
<string name="web_home_www">https://www.copymanga.net</string>
|
||||
<string name="web_comic_detail_pc">https://www.copymanga.net/comic</string>
|
||||
<string name="web_home">https://www.copy20.com</string>
|
||||
<string name="web_home_www">https://www.copy20.com</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>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fumiama.copymanga
|
||||
package top.fumiama.copymangaweb
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
14
build.gradle
14
build.gradle
@@ -1,12 +1,15 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.5.31'
|
||||
ext.kotlin_version = "$cm_kotlin_version"
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url 'https://maven.google.com' }
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
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"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
@@ -17,10 +20,11 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register('clean', Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@@ -19,4 +19,8 @@ android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
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
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Wed Oct 14 16:47:38 CST 2020
|
||||
#Fri Sep 04 18:15:43 CST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
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
|
||||
@@ -1,2 +1,8 @@
|
||||
pluginManagement {
|
||||
plugins {
|
||||
id 'kotlin-android' version "$cm_kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
include ':app'
|
||||
rootProject.name = "拷贝漫画"
|
||||
Reference in New Issue
Block a user