Module:EpisodeLink

local p = {} function p.GetNumber( frame ) local LATEST_NAVER = 45  -- Update this on Mondays - most recent episode # local LATEST_WEBTOONS = 7 -- Update this on Wednesdays - most recent episode # local site = frame.args[1] local anchor = frame.args[2] local episode = frame.args[3] local LinkNumber = 0 local LinkTxt = "Something went wrong." -- Get the link number. episode = tonumber( episode ) -- Return Naver link if (site == "naver") then if (anchor == "1") then if (episode <= 110) then LinkNumber = episode elseif (episode <= 130) then LinkNumber = episode + 1 else LinkNumber = episode + 2 end end if (anchor == "1") or (episode <= LATEST_NAVER) then LinkTxt = "[https://comic.naver.com/webtoon/detail.nhn?titleId=738694&no=" .. LinkNumber .. " Korean Episode]" else LinkTxt = "Not yet available on NAVER" end -- Return LINE link elseif (site == "line") then if (anchor == "1") then LinkNumber = episode end if (episode <= LATEST_WEBTOONS) then LinkTxt = "[https://webtoons.com/viewer?titleNo=2409&episodeNo=" .. LinkNumber .. " English Episode]" else LinkTxt = "Not yet available on LINE" end end return LinkTxt end return p --