diff --git a/.gitignore b/.gitignore index 2ca7ce1..0b48536 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules/ +docs/ *.log .DS_Store -dist/ diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..44890d1 --- /dev/null +++ b/.npmignore @@ -0,0 +1,4 @@ +docs/ +*.log +.git +.github diff --git a/client.js b/client.js index 855cd6e..c43ef65 100644 --- a/client.js +++ b/client.js @@ -2889,7 +2889,12 @@ headerButtons.prepend(installBtn); } + function isYakTubeInstance() { + return window.location.hostname.includes('yaktube.yakhub.com.tr') || getInstanceName() === 'YakTube'; + } + function injectApkDownloadButton() { + if (!isYakTubeInstance()) return; // 1. If inside APK: NEVER show APK button if (isInsideYakTubeApp) { var existBtnApp = document.getElementById('yaktube-apk-download-btn'); @@ -2934,6 +2939,7 @@ } function injectSidebarApkLink() { + if (!isYakTubeInstance()) return; // If inside APK: NEVER show in sidebar if (isInsideYakTubeApp) { var existLink = document.getElementById('yaktube-sidebar-apk-link'); diff --git a/package.json b/package.json index 30a94ed..7630799 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "peertube-plugin-yaktube-ondemand", - "version": "1.4.7", + "version": "1.4.8", "description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube", "main": "main.js", "library": "./main.js",