Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CORBIERE Sebastien committed Jun 22, 2024
1 parent bc274b7 commit 3a16a07
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
23 changes: 23 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title><%= htmlWebpackPlugin.options.title %>
</title>
</head>

<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>

</html>
6 changes: 5 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ import ViewerInterface from '../views/ViewerInterface.vue';
const routes = [
{
path: '/',
redirect: { name: 'SegmentSelector' }
},
{
path: '/YTClipPlaylist/',
name: 'SegmentSelector',
component: SegmentSelector,
},
{
path: '/viewer/:customHeader?',
path: '/YTClipPlaylist/viewer/:customHeader?',
name: 'ViewerInterface',
component: ViewerInterface,
props: true,
Expand Down
4 changes: 2 additions & 2 deletions src/views/SegmentSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default {
// Assuming content is JSON and needs to be processed
try {
const compactData = JSON.parse(content);
this.segments = this.convertFromCompactFormat(compactData);
this.segments = this.convertFromCompact(compactData);
} catch (error) {
console.error("Error parsing JSON:", error);
// Handle error
Expand Down Expand Up @@ -150,7 +150,7 @@ export default {
const jsonData = JSON.stringify(compactSegments);
const base64EncodedData = btoa(encodeURIComponent(jsonData)); // Encode the JSON string as Base64
const viewerStyle = this.selectedStyle && ('/' + this.selectedStyle) || '';
const viewerUrl = `${window.location.origin}/viewer${viewerStyle}?data=${base64EncodedData}`; // Construct the viewer URL with the encoded data as a parameter
const viewerUrl = `${window.location.href}viewer${viewerStyle}?data=${base64EncodedData}`; // Construct the viewer URL with the encoded data as a parameter
// Check if the URL exceeds 2000 characters, a common practical limit
if (viewerUrl.length > 2000) {
Expand Down

0 comments on commit 3a16a07

Please sign in to comment.