modflix.xyz bypasser

Bypass modflix.xyz download links

  1. // ==UserScript==
  2. // @name modflix.xyz bypasser
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Bypass modflix.xyz download links
  6. // @author limeo
  7. // @license MIT
  8. // @match *://*/*
  9. // @icon https://moviesmod.life/wp-content/uploads/2022/10/moviesmod.png
  10. // @grant GM_registerMenuCommand
  11. // @grant GM_setValue
  12. // @grant GM_getValue
  13. // ==/UserScript==
  14.  
  15. ;(function () {
  16. "use strict"
  17.  
  18. const options = [
  19. {
  20. key: "instant",
  21. selector: "a.btn.btn-danger",
  22. },
  23. {
  24. key: "resume",
  25. selector: "a.btn.btn-light",
  26. },
  27. ]
  28.  
  29. const setOption = (key, value) => {
  30. GM_setValue(key, value)
  31. }
  32.  
  33. const getOption = (key) => {
  34. return GM_getValue(key)
  35. }
  36.  
  37. // Modified to set default to "resume"
  38. const initOptions = () => {
  39. options.forEach((option) => {
  40. const currentValue = getOption(option.key)
  41. if (currentValue === undefined) {
  42. // Set "resume" as the default option
  43. setOption(option.key, option.key === "resume")
  44. }
  45. })
  46. }
  47.  
  48. // Function to log the current option
  49. const logCurrentOption = () => {
  50. const isInstant = getOption("instant")
  51. alert(`Current download option is: ${isInstant ? "Instant Download" : "Resume Download"}`)
  52. // console.log(
  53. // `Current download option is: ${isInstant ? "instant" : "resume"}`
  54. // )
  55. }
  56.  
  57. // Modified to set options directly
  58. const initMenu = () => {
  59. GM_registerMenuCommand("Set Instant Download", () => {
  60. setOption("instant", true)
  61. setOption("resume", false)
  62. logCurrentOption()
  63. })
  64.  
  65. GM_registerMenuCommand("Set Resume Download", () => {
  66. setOption("instant", false)
  67. setOption("resume", true)
  68. logCurrentOption()
  69. })
  70.  
  71. GM_registerMenuCommand("Log Current Option", logCurrentOption)
  72.  
  73. // GM_registerMenuCommand("Reset Options", () => {
  74. // options.forEach((option) => {
  75. // setOption(option.key, option.key === "resume")
  76. // })
  77. // logCurrentOption()
  78. // })
  79.  
  80. GM_registerMenuCommand("Go to modflix.xyz", () => {
  81. // Open modflix.xyz in new tab
  82. window.open("https://modflix.xyz")
  83. })
  84. }
  85.  
  86. const init = () => {
  87. initOptions()
  88. initMenu()
  89. }
  90.  
  91. init()
  92.  
  93. // Function to check website domain
  94. function isMatchingDomain(url) {
  95. const allowedDomains = [
  96. "https://episodes.modpro.co/archives/", //hollywood series page (episodes)
  97. "https://links.modpro.co/archives/", //hollywood movie page (links)
  98. "https://leech.modpro.co/archives/", //leech page (bollywood movies)
  99. "https://driveseed.org/file/",
  100. "https://driveleech.org/file/",
  101. "https://video-seed.xyz/", // Instant download
  102. "https://workerseed.dev/", // Resume download
  103. "https://driveseed.org/zfile/", // Resume download (alternative)
  104. "https://driveleech.org/zfile/", // Resume download (alternative)
  105. ]
  106. return allowedDomains.some((domain) => url.startsWith(domain))
  107. }
  108.  
  109. // Function to handle actions on driveseed.org
  110. function handle_driveSeedsOrLeechs() {
  111. // Find and click the download button (example selector)
  112. setTimeout(() => {
  113. // Implement logic based on the current option
  114. const performActionBasedOnOption = () => {
  115. if (getOption("instant")) {
  116. console.log("Performing action for instant option.")
  117. // Add your logic for "instant" option here
  118. let downloadButton = document.querySelector("a.btn.btn-danger")
  119. if (downloadButton) {
  120. const url = downloadButton.href
  121. window.location.href = url
  122. console.log("Navigated to:", url)
  123. } else {
  124. console.log("Instant Download button not found on driveseed.org")
  125. //set resume option
  126. GM_setValue("instant", false)
  127. GM_setValue("resume", true)
  128. }
  129. }
  130. if (getOption("resume")) {
  131. console.log("Performing action for resume option.")
  132. // Add your logic for "resume" option here
  133. let downloadButtons = document.querySelectorAll(
  134. "a.btn.btn-light, a.btn.btn-warning"
  135. )
  136.  
  137. let downloadButton = Array.from(downloadButtons).find(Boolean)
  138. console.log("downloadButton:", downloadButton)
  139.  
  140. if (downloadButton) {
  141. const url = downloadButton.href
  142. window.location.href = url
  143. console.log("Navigated to:", url)
  144. } else {
  145. console.log("Resume Download button not found on driveseed.org")
  146. //set instant option
  147. GM_setValue("instant", true)
  148. GM_setValue("resume", false)
  149. }
  150. }
  151. }
  152. performActionBasedOnOption()
  153. }, 500)
  154. }
  155.  
  156. // Function to handle actions on episodes.modpro.co and links.modpro.co
  157. function handleModproSites() {
  158. // Find and click the "allEpisodesButton" (if it exists)
  159. setTimeout(() => {
  160. const allEpisodesButton = document.getElementById("allEpisodesButton")
  161. if (allEpisodesButton) {
  162. // Click the "allEpisodesButton"
  163. // also close the tab after 5 seconds
  164. allEpisodesButton.click()
  165. setTimeout(() => {
  166. window.close()
  167. }, 500)
  168. console.log("Navigated to all episodes on modpro.co site")
  169. } else {
  170. console.log("All episodes button not found on modpro.co site")
  171. }
  172.  
  173. // Find and click the server button (example selector)
  174. const serverButtons = document.querySelectorAll(".maxbutton")
  175. const serverButton = Array.from(serverButtons).find(Boolean)
  176. console.log("serverButton:", serverButton)
  177.  
  178. if (serverButton) {
  179. const serverLink = serverButton.href
  180. window.location.href = serverLink
  181. console.log("Navigated to server link on modpro.co site")
  182. } else {
  183. console.log("Server buttons not found on modpro.co site")
  184. }
  185. }, 500)
  186. }
  187.  
  188. function handleInstantDL() {
  189. //start download after 1 second
  190. //https://video-seed.xyz/
  191. setTimeout(() => {
  192. const downloadButton = document.getElementById("ins")
  193. if (downloadButton) {
  194. downloadButton.click()
  195. console.log("download begins...")
  196. } else {
  197. console.log('Download button with ID "ins" not found')
  198. }
  199. }, 1000) // Adjust delay as needed
  200. }
  201.  
  202. function handleResumeDL() {
  203. //start download after 1 second
  204. //https://workerseed.dev/ or https://driveleech.org/zfile/
  205. setTimeout(() => {
  206. if (window.location.href.startsWith("https://workerseed.dev/")) {
  207. const downloadButton = document.getElementById("download")
  208. if (downloadButton) {
  209. downloadButton.click()
  210. console.log("download begins...")
  211. } else {
  212. console.log('Download button with ID "download" not found')
  213. }
  214. } else {
  215. const downloadButton = document.querySelector("a.btn.btn-success")
  216. if (downloadButton) {
  217. const url = downloadButton.href
  218. window.location.href = url
  219. console.log("download begins...")
  220. } else {
  221. console.log('Download button with class "btn btn-success" not found')
  222. }
  223. }
  224. }, 1000) // Adjust delay as needed
  225. }
  226.  
  227. // Main execution based on domain
  228. const currentUrl = window.location.href
  229. if (isMatchingDomain(currentUrl)) {
  230. if (
  231. currentUrl.startsWith("https://driveseed.org/file/") ||
  232. currentUrl.startsWith("https://driveleech.org/file/")
  233. ) {
  234. handle_driveSeedsOrLeechs()
  235. } else if (currentUrl.startsWith("https://video-seed.xyz/")) {
  236. handleInstantDL()
  237. } else if (
  238. currentUrl.startsWith("https://workerseed.dev/") ||
  239. currentUrl.startsWith("https://driveleech.org/zfile/") ||
  240. currentUrl.startsWith("https://driveseed.org/zfile/")
  241. ) {
  242. handleResumeDL()
  243. } else {
  244. // episodes.modpro.co or links.modpro.co or leech.modpro.co
  245. handleModproSites()
  246. }
  247. } else {
  248. console.log("Script not applicable for this domain")
  249. }
  250. })()