-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8d94810
Showing
160 changed files
with
861 additions
and
0 deletions.
There are no files selected for viewing
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,33 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
auto-imports.d.ts | ||
components.d.ts | ||
package-lock.json | ||
yarn.lock | ||
pnpm-lock.yaml | ||
.nova | ||
.fleet | ||
|
||
.devcontainer |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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,32 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>小丑的结局总是千篇一律</title> | ||
<link rel="stylesheet" href="./styles/tailwind.css" /> | ||
</head> | ||
<body> | ||
<div class="min-w-44 py-4 border flex-col flex items-center justify-center"> | ||
<div class="h-44 w-44 cursor-pointer" id="joker-gif-container"> | ||
<img | ||
src="/images/joker-gif/frame_000_delay-0.02s.gif" | ||
id="joker" | ||
class="active:scale-95 transition-transform h-full w-full" | ||
alt="" | ||
/> | ||
</div> | ||
<button | ||
id="download-img-btn" | ||
class="border p-1 rounded-md group active:scale-95 transition-all" | ||
> | ||
🤡 | ||
<span class="group-hover:hidden"> 请点击小丑 </span> | ||
<span class="hidden group-hover:inline">下载当前图片</span> | ||
</button> | ||
<audio loop id="joker-audio" src="./audio/joker.m4s" /> | ||
</div> | ||
</body> | ||
|
||
<script src="./js/joker.js"></script> | ||
</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,97 @@ | ||
window.addEventListener("load", () => { | ||
const createJokerGif = () => { | ||
const img = document.createElement("img"); | ||
img.src = "./images/joker.gif"; | ||
img.id = "joker-gif"; | ||
// <img src="./images/joker.gif" id="joker-gif" class="hidden group-hover:block" /> | ||
}; | ||
|
||
const timeInfo = { | ||
star: 0, | ||
end: 149, | ||
current: 0, | ||
status: false, | ||
}; | ||
|
||
const updateTime = (current) => { | ||
timeInfo.current = current; | ||
}; | ||
|
||
const jokerGifPath = (time) => { | ||
// 始终让时间为三位数 | ||
if (time < 10) { | ||
time = `00${time}`; | ||
} else if (time < 100) { | ||
time = `0${time}`; | ||
} | ||
return `/images/joker-gif/frame_${time}_delay-0.02s.gif`; | ||
}; | ||
|
||
const getStyle = (path) => { | ||
return `background-image: url(${path});`; | ||
}; | ||
|
||
//设置定时器,每隔0.02s更新一次gif | ||
|
||
//这里会有白色闪烁,因为图片是从0开始的,所以会有一瞬间的白色,需要预先把图片加载好 | ||
//存储到数组中,然后再加载,存储为base64 | ||
const images = []; | ||
|
||
const reloadImages = () => { | ||
for (let i = 0; i <= timeInfo.end; i++) { | ||
const img = new Image(); | ||
img.src = jokerGifPath(i); | ||
img.onload = () => { | ||
images.push(jokerGifPath(i)); | ||
}; | ||
} | ||
}; | ||
reloadImages(); | ||
let autoUpdate; | ||
|
||
const autoPlayGif = () => { | ||
autoUpdate = setInterval(() => { | ||
if (timeInfo.current < timeInfo.end) { | ||
console.log(timeInfo.current); | ||
updateTime(timeInfo.current + 1); | ||
} else { | ||
updateTime(timeInfo.star); | ||
} | ||
jokerImg.src = jokerGifPath(timeInfo.current); | ||
}, 20); | ||
}; | ||
|
||
const jokerImg = document.querySelector("#joker"); | ||
const jokerAudio = document.querySelector("#joker-audio"); | ||
|
||
const pause = () => { | ||
clearInterval(autoUpdate); | ||
jokerAudio.pause(); | ||
}; | ||
const play = () => { | ||
autoPlayGif(); | ||
// jokerAudio.currentTime = 0; | ||
jokerAudio.play(); | ||
}; | ||
|
||
jokerImg.addEventListener("click", () => { | ||
//重置音频时间 | ||
|
||
//播放gif和暂停gif | ||
if (timeInfo.status) { | ||
pause(); | ||
} else { | ||
play(); | ||
} | ||
timeInfo.status = !timeInfo.status; | ||
}); | ||
const downloadJokerBtn = document.querySelector('#download-img-btn') | ||
downloadJokerBtn.addEventListener('click',()=>{ | ||
pause() | ||
const a = document.createElement('a') | ||
a.href = images[timeInfo.current] | ||
a.download = '自怕照.gif' | ||
a.click() | ||
|
||
}) | ||
}); |
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,10 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "Joker", | ||
"description": "你在照镜子吗", | ||
"version": "1.0", | ||
"action": { | ||
"default_popup": "joker.html", | ||
"default_icon": "images/joker.png" | ||
} | ||
} |
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 @@ | ||
{ | ||
"name": "jocker", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"scripts": { | ||
"dev": "tailwindcss -i ./styles/input.css -o ./styles/tailwind.css --watch" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"description": "", | ||
"devDependencies": { | ||
"tailwindcss": "^3.4.10" | ||
} | ||
} |
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,9 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
* { | ||
user-select: none; | ||
|
||
-webkit-user-drag: none; | ||
} |
Oops, something went wrong.