Browse Source

chore: replace url to old github project (fix #53)

20230724
Jixun Wu 1 year ago
parent
commit
a269cd4f8e
  1. 8
      extension-manifest.json
  2. 4
      package.json
  3. 106
      public/index.html
  4. 10
      src/App.vue
  5. 4
      src/component/ConfigDialog.vue
  6. 2
      src/decrypt/__test__/joox.test.ts
  7. 23
      src/view/Home.vue

8
extension-manifest.json

@ -6,11 +6,13 @@
"128": "./img/icons/msapplication-icon-144x144.png" "128": "./img/icons/msapplication-icon-144x144.png"
}, },
"description": "在任何设备上解锁已购的加密音乐!", "description": "在任何设备上解锁已购的加密音乐!",
"permissions": ["storage"], "permissions": [
"storage"
],
"offline_enabled": true, "offline_enabled": true,
"options_page": "./index.html", "options_page": "./index.html",
"homepage_url": "https://github.com/ix64/unlock-music", "homepage_url": "https://git.unlock-music.dev/um/web",
"browser_action": { "browser_action": {
"default_popup": "./popup.html" "default_popup": "./popup.html"
} }
} }

4
package.json

@ -7,7 +7,7 @@
"description": "Unlock encrypted music file in browser.", "description": "Unlock encrypted music file in browser.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/ix64/unlock-music" "url": "https://git.unlock-music.dev/um/web"
}, },
"private": true, "private": true,
"scripts": { "scripts": {
@ -57,4 +57,4 @@
"vue-cli-plugin-element": "^1.0.1", "vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.14" "vue-template-compiler": "^2.6.14"
} }
} }

106
public/index.html

@ -1,39 +1,89 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta content="webkit" name="renderer"> <meta content="webkit" name="renderer" />
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
<meta content="width=device-width,initial-scale=1.0" name="viewport"> <meta content="width=device-width,initial-scale=1.0" name="viewport" />
<title>音乐解锁</title> <title>音乐解锁</title>
<meta content="音乐,解锁,ncm,qmc,mgg,mflac,qq音乐,网易云音乐,加密" name="keywords"/> <meta content="音乐,解锁,ncm,qmc,mgg,mflac,qq音乐,网易云音乐,加密" name="keywords" />
<meta content="音乐解锁 - 在任何设备上解锁已购的加密音乐!" name="description"/> <meta content="音乐解锁 - 在任何设备上解锁已购的加密音乐!" name="description" />
<!--@formatter:off--> <style>
<style>#loader{position:absolute;left:50%;top:50%;z-index:1010;margin:-75px 0 0 -75px;border:16px solid #f3f3f3;border-radius:50%;border-top:16px solid #1db1ff;width:120px;height:120px;animation:spin 2s linear infinite}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}#loader-mask{text-align:center;position:absolute;width:100%;height:100%;bottom:0;left:0;right:0;top:0;z-index:1009;background-color:rgba(242,246,252,.88)}@media (prefers-color-scheme:dark){#loader-mask{color:#fff;background-color:rgba(0,0,0,.85)}#loader-mask a{color:#ddd}#loader-mask a:hover{color:#1db1ff}}#loader-source{font-size:1.5rem}#loader-tips-timeout{font-size:1.2rem}</style> #loader {
<!--@formatter:on--> position: absolute;
</head> left: 50%;
<body> top: 50%;
z-index: 1010;
margin: -75px 0 0 -75px;
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid #1db1ff;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
#loader-mask {
text-align: center;
position: absolute;
width: 100%;
height: 100%;
bottom: 0;
left: 0;
right: 0;
top: 0;
z-index: 1009;
background-color: rgba(242, 246, 252, 0.88);
}
@media (prefers-color-scheme: dark) {
#loader-mask {
color: #fff;
background-color: rgba(0, 0, 0, 0.85);
}
#loader-mask a {
color: #ddd;
}
#loader-mask a:hover {
color: #1db1ff;
}
}
#loader-source {
font-size: 1.5rem;
}
#loader-tips-timeout {
font-size: 1.2rem;
}
</style>
</head>
<div id="loader-mask"> <body>
<div id="loader"></div> <div id="loader-mask">
<noscript> <div id="loader"></div>
<noscript>
<h3 id="loader-js">请启用JavaScript</h3> <h3 id="loader-js">请启用JavaScript</h3>
</noscript> </noscript>
<h3 id="loader-source"> 请勿直接运行源代码! </h3> <h3 id="loader-source">请勿直接运行源代码!</h3>
<div id="loader-tips-outdated" hidden> <div id="loader-tips-outdated" hidden>
<h2>您可能在使用不受支持的<span style="color:#f00;">过时</span>浏览器,这可能导致此应用无法正常工作。</h2> <h2>您可能在使用不受支持的<span style="color: #f00">过时</span>浏览器,这可能导致此应用无法正常工作。</h2>
<h3>如果您使用双核浏览器,您可以尝试切换到 <span style="color:#f00;">“极速模式”</span> 解决此问题。</h3> <h3>如果您使用双核浏览器,您可以尝试切换到 <span style="color: #f00">“极速模式”</span> 解决此问题。</h3>
<h3>或者,您可以尝试更换下方的几个浏览器之一。</h3> <h3>或者,您可以尝试更换下方的几个浏览器之一。</h3>
</div> </div>
<h3 id="loader-tips-timeout" hidden> <h3 id="loader-tips-timeout" hidden>
音乐解锁采用了一些新特性!建议使用 音乐解锁采用了一些新特性!建议使用
<a href="https://www.microsoft.com/zh-cn/edge" target="_blank">Microsoft Edge Chromium</a> <a href="https://www.microsoft.com/zh-cn/edge" target="_blank">Microsoft Edge Chromium</a>
<a href="https://www.google.cn/chrome/" target="_blank">Google Chrome</a> <a href="https://www.google.cn/chrome/" target="_blank">Google Chrome</a>
<a href="https://www.firefox.com.cn/" target="_blank">Mozilla Firefox</a> <a href="https://www.firefox.com.cn/" target="_blank">Mozilla Firefox</a>
| <a href="https://github.com/ix64/unlock-music/wiki/使用提示" target="_blank">使用提示</a> | <a href="https://git.unlock-music.dev/um/web/wiki/使用提示" target="_blank">使用提示</a>
</h3> </h3>
</div> </div>
<div id="app"></div> <div id="app"></div>
<script src="./loader.js"></script> <script src="./loader.js"></script>
</body> </body>
</html> </html>

10
src/App.vue

@ -5,19 +5,19 @@
</el-main> </el-main>
<el-footer id="app-footer"> <el-footer id="app-footer">
<el-row> <el-row>
<a href="https://github.com/ix64/unlock-music" target="_blank">音乐解锁</a>({{ version }}) <a href="https://git.unlock-music.dev/um/web" target="_blank">音乐解锁</a>({{ version }})
移除已购音乐的加密保护 移除已购音乐的加密保护
<a href="https://github.com/ix64/unlock-music/wiki/使用提示" target="_blank">使用提示</a> <a href="https://git.unlock-music.dev/um/web/wiki/使用提示" target="_blank">使用提示</a>
</el-row> </el-row>
<el-row> <el-row>
目前支持 网易云音乐(ncm), QQ音乐(qmc, mflac, mgg), 酷狗音乐(kgm), 虾米音乐(xm), 酷我音乐(.kwm) 目前支持 网易云音乐(ncm), QQ音乐(qmc, mflac, mgg), 酷狗音乐(kgm), 虾米音乐(xm), 酷我音乐(.kwm)
<a href="https://github.com/ix64/unlock-music/blob/master/README.md" target="_blank">更多</a> <a href="https://git.unlock-music.dev/um/web/src/branch/master/README.md" target="_blank">更多</a>
</el-row> </el-row>
<el-row> <el-row>
<!--如果进行二次开发此行版权信息不得移除且应明显地标注于页面上--> <!--如果进行二次开发此行版权信息不得移除且应明显地标注于页面上-->
<span>Copyright &copy; 2019 - {{ new Date().getFullYear() }} MengYX</span> <span>Copyright &copy; 2019 - {{ new Date().getFullYear() }} MengYX</span>
音乐解锁使用 音乐解锁使用
<a href="https://github.com/ix64/unlock-music/blob/master/LICENSE" target="_blank">MIT许可协议</a> <a href="https://git.unlock-music.dev/um/web/src/branch/master/LICENSE" target="_blank">MIT许可协议</a>
开放源代码 开放源代码
</el-row> </el-row>
</el-footer> </el-footer>
@ -77,7 +77,7 @@ export default {
<div class="update-title">最近更新</div> <div class="update-title">最近更新</div>
<div class="update-content"> ${config.updateInfo} </div> <div class="update-content"> ${config.updateInfo} </div>
</div> </div>
<a target="_blank" href="https://github.com/ix64/unlock-music/wiki/使用提示">使用提示</a> <a target="_blank" href="https://git.unlock-music.dev/um/web/wiki/使用提示">使用提示</a>
</div>`, </div>`,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
duration: 10000, duration: 10000,

4
src/component/ConfigDialog.vue

@ -43,7 +43,9 @@ form >>> input {
下载该加密文件的 JOOX 应用所记录的设备唯一识别码 下载该加密文件的 JOOX 应用所记录的设备唯一识别码
<br /> <br />
参见 参见
<a href="https://github.com/unlock-music/joox-crypto/wiki/%E8%8E%B7%E5%8F%96%E8%AE%BE%E5%A4%87-UUID"> <a
href="https://git.unlock-music.dev/um/joox-crypto/wiki/%E8%8E%B7%E5%8F%96%E8%AE%BE%E5%A4%87-UUID#%E5%89%8D%E8%A8%80"
>
获取设备 UUID · unlock-music/joox-crypto Wiki</a 获取设备 UUID · unlock-music/joox-crypto Wiki</a
> >
</p> </p>

2
src/decrypt/__test__/joox.test.ts

@ -22,7 +22,7 @@ describe('decrypt/joox', () => {
album: 'unused', album: 'unused',
blob: blob, blob: blob,
artist: 'unused', artist: 'unused',
imgUrl: 'https://github.com/unlock-music', imgUrl: 'https://example.unlock-music.dev/',
}; };
}); });

23
src/view/Home.vue

@ -18,7 +18,9 @@
:album="editing_data.album" :album="editing_data.album"
:albumartist="editing_data.albumartist" :albumartist="editing_data.albumartist"
:genre="editing_data.genre" :genre="editing_data.genre"
@cancel="showEditDialog = false" @ok="handleEdit"></edit-dialog> @cancel="showEditDialog = false"
@ok="handleEdit"
></edit-dialog>
<config-dialog :show="showConfigDialog" @done="showConfigDialog = false"></config-dialog> <config-dialog :show="showConfigDialog" @done="showConfigDialog = false"></config-dialog>
<el-tooltip class="item" effect="dark" placement="top"> <el-tooltip class="item" effect="dark" placement="top">
<div slot="content"> <div slot="content">
@ -37,14 +39,20 @@
开启后解锁结果将不会存留于浏览器中防止内存不足 开启后解锁结果将不会存留于浏览器中防止内存不足
</span> </span>
</div> </div>
<el-checkbox v-model="instant_save" type="success" border class="ml-2">立即保存</el-checkbox> <el-checkbox v-model="instant_save" type="success" border class="ml-2">立即保存</el-checkbox>
</el-tooltip> </el-tooltip>
</el-row> </el-row>
</div> </div>
<audio :autoplay="playing_auto" :src="playing_url" controls /> <audio :autoplay="playing_auto" :src="playing_url" controls />
<PreviewTable :policy="filename_policy" :table-data="tableData" @download="saveFile" @edit="editFile" @play="changePlaying" /> <PreviewTable
:policy="filename_policy"
:table-data="tableData"
@download="saveFile"
@edit="editFile"
@play="changePlaying"
/>
</div> </div>
</template> </template>
@ -70,7 +78,7 @@ export default {
return { return {
showConfigDialog: false, showConfigDialog: false,
showEditDialog: false, showEditDialog: false,
editing_data: { picture: '', title: '', artist: '', album: '', albumartist: '', genre: '', }, editing_data: { picture: '', title: '', artist: '', album: '', albumartist: '', genre: '' },
tableData: [], tableData: [],
playing_url: '', playing_url: '',
playing_auto: false, playing_auto: false,
@ -111,7 +119,7 @@ export default {
errInfo + errInfo +
',' + ',' +
filename + filename +
',参考<a target="_blank" href="https://github.com/ix64/unlock-music/wiki/使用提示">使用提示</a>', ',参考<a target="_blank" href="https://git.unlock-music.dev/um/web/wiki/使用提示">使用提示</a>',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
duration: 6000, duration: 6000,
}); });
@ -164,12 +172,13 @@ export default {
console.warn('获取图像失败', this.editing_data.picture); console.warn('获取图像失败', this.editing_data.picture);
} }
} }
const newMeta = { picture: imageInfo?.buffer, const newMeta = {
picture: imageInfo?.buffer,
title: data.title, title: data.title,
artists: data.artist.split(split_regex), artists: data.artist.split(split_regex),
album: data.album, album: data.album,
albumartist: data.albumartist, albumartist: data.albumartist,
genre: data.genre.split(split_regex) genre: data.genre.split(split_regex),
}; };
const buffer = Buffer.from(await this.editing_data.blob.arrayBuffer()); const buffer = Buffer.from(await this.editing_data.blob.arrayBuffer());
const mime = AudioMimeType[this.editing_data.ext] || AudioMimeType.mp3; const mime = AudioMimeType[this.editing_data.ext] || AudioMimeType.mp3;

Loading…
Cancel
Save