-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from vordenken/feature/v0.3
Feature/v0.3
- Loading branch information
Showing
17 changed files
with
309 additions
and
25 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Thank you so much for supporting me. This will help me further develop apps and eventually publish them in the AppStore. | ||
|
||
buy_me_a_coffee: vordenken | ||
buy_me_a_coffee: vordenken | ||
ko_fi: vordenken |
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 |
---|---|---|
|
@@ -60,3 +60,5 @@ fastlane/report.xml | |
fastlane/Preview.html | ||
fastlane/screenshots/**/*.png | ||
fastlane/test_output | ||
|
||
releases/ |
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
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
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.
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
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 |
---|---|---|
@@ -1,11 +1,99 @@ | ||
<!-- popup.html --> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="stylesheet" href="popup.css"> | ||
<script type="module" src="popup.js"></script> | ||
<style> | ||
body { | ||
width: 250px; | ||
padding: 15px; | ||
font-family: -apple-system; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 15px; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
align-items: center; | ||
gap: 10px; | ||
} | ||
|
||
.app-icon { | ||
width: 48px; | ||
height: 48px; | ||
} | ||
|
||
.app-name { | ||
font-size: 18px; | ||
font-weight: bold; | ||
} | ||
|
||
.version { | ||
color: #666; | ||
font-size: 12px; | ||
} | ||
|
||
.checkbox-container { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
margin: 10px 0; | ||
} | ||
|
||
.links { | ||
display: flex; | ||
gap: 15px; | ||
margin-top: 10px; | ||
} | ||
|
||
.link-icon { | ||
width: 24px; | ||
height: 24px; | ||
opacity: 0.8; | ||
transition: opacity 0.2s; | ||
} | ||
|
||
.link-icon:hover { | ||
opacity: 1; | ||
} | ||
|
||
hr { | ||
width: 100%; | ||
border: none; | ||
border-top: 1px solid #ddd; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<strong>Hello World!</strong> | ||
<div class="header"> | ||
<img src="images/icon-64.png" class="app-icon" alt="AutoPiP"> | ||
<div> | ||
<div class="app-name">AutoPiP</div> | ||
<div class="version">v0.3</div> | ||
</div> | ||
</div> | ||
|
||
<div class="checkbox-container"> | ||
<label for="toggleCheckbox">Enabled</label> | ||
<input type="checkbox" id="toggleCheckbox" checked> | ||
</div> | ||
|
||
<hr> | ||
|
||
<div class="links"> | ||
<a href="https://github.com/vordenken/AutoPiP" target="_blank"> | ||
<img src="images/icons8-github-64.png" class="link-icon" alt="GitHub"> | ||
</a> | ||
<a href="https://ko-fi.com/vordenken" target="_blank"> | ||
<img src="images/icons8-kofi-64.png" class="link-icon" alt="Ko-fi"> | ||
</a> | ||
<a href="https://www.buymeacoffee.com/vordenken" target="_blank"> | ||
<img src="images/icons8-bmc-64.png" class="link-icon" alt="Buy Me a Coffee"> | ||
</a> | ||
</div> | ||
|
||
<script src="popup.js"></script> | ||
</body> | ||
</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 |
---|---|---|
@@ -1 +1,36 @@ | ||
console.log("Hello World!", browser); | ||
// popup.js | ||
document.addEventListener('DOMContentLoaded', function() { | ||
const toggleCheckbox = document.getElementById('toggleCheckbox'); | ||
|
||
// Lade gespeicherten Status | ||
browser.storage.local.get('enabled', function(result) { | ||
const enabled = result.enabled === undefined ? true : result.enabled; | ||
toggleCheckbox.checked = enabled; | ||
|
||
// Sende initialen Status an alle Tabs | ||
updateAllTabs(enabled); | ||
}); | ||
|
||
// Checkbox Event Listener | ||
toggleCheckbox.addEventListener('change', function() { | ||
const enabled = toggleCheckbox.checked; | ||
console.log('Checkbox changed to:', enabled); // Debug logging | ||
|
||
// Speichere Status | ||
browser.storage.local.set({ enabled: enabled }); | ||
|
||
// Update alle Tabs | ||
updateAllTabs(enabled); | ||
}); | ||
}); | ||
|
||
function updateAllTabs(enabled) { | ||
browser.tabs.query({}, function(tabs) { | ||
tabs.forEach(tab => { | ||
browser.tabs.sendMessage(tab.id, { | ||
command: "toggleAutoPiP", | ||
enabled: enabled | ||
}).catch(err => console.log('Error sending message to tab:', err)); | ||
}); | ||
}); | ||
} |
Oops, something went wrong.