feat: enhance PDF tools with new features and UI improvements
- Added 'Extract Attachments' and 'Edit Attachments' functionalities to manage embedded files in PDFs. - Introduced new splitting options: by bookmarks and by a specified number of pages (N times). - Updated the user interface to include new options and improved layout for better usability. - Enhanced the GitHub link display with dynamic star count retrieval. - Bumped version to 1.4.0 and updated footer to reflect the new version. - Refactored existing code for better maintainability and added new TypeScript definitions for the new features.
This commit is contained in:
@@ -42,6 +42,11 @@ const init = () => {
|
||||
heroSection.style.display = 'none';
|
||||
}
|
||||
|
||||
const githubLink = document.querySelector('a[href*="github.com/alam00000/bentopdf"]');
|
||||
if (githubLink) {
|
||||
(githubLink as HTMLElement).style.display = 'none';
|
||||
}
|
||||
|
||||
const featuresSection = document.getElementById('features-section');
|
||||
if (featuresSection) {
|
||||
featuresSection.style.display = 'none';
|
||||
@@ -87,6 +92,9 @@ const init = () => {
|
||||
<p class="text-gray-400 text-sm">
|
||||
© 2025 BentoPDF. All rights reserved.
|
||||
</p>
|
||||
<p class="text-gray-500 text-xs mt-2">
|
||||
Version <span id="app-version-simple">1.4.0</span>
|
||||
</p>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(simpleFooter);
|
||||
@@ -259,6 +267,20 @@ const init = () => {
|
||||
|
||||
createIcons({ icons });
|
||||
console.log('Please share our tool and share the love!');
|
||||
|
||||
const githubStarsElement = document.getElementById('github-stars');
|
||||
if (githubStarsElement && !__SIMPLE_MODE__) {
|
||||
fetch('https://api.github.com/repos/alam00000/bentopdf')
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
if (data.stargazers_count !== undefined) {
|
||||
githubStarsElement.textContent = data.stargazers_count.toLocaleString();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
githubStarsElement.textContent = '-';
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
|
||||
Reference in New Issue
Block a user