FANDOM


-- This module was taken and adapted from the Kubera Wiki
-- 
-- 
-- 
-- This module needs to be updated every Saturday when the new Lezhin chapter is released.
-- 
-- How webtoon numbering for Lezhin is calculated:
-- Chapter 1 onwards: chapter #
--
-- How webtoon numbering for Mangacow is calculated:
-- Chapter 1 onwards: chapter #
--
--
--
 
local p = {}
 
function p.GetNumber( frame )
    local LATEST_LEZHIN = 90   -- Update this on Saturdays - most recent chapter #
    local LATEST_MANGACOW = 90 -- Update this whenever a new chapter is released
    local site = frame.args[1]
    local anchor = frame.args[2]
    local chapter = frame.args[3]
    local LinkNumber = 0
    local LinkTxt = "Something went wrong."
 
    -- Get the link number.
    chapter = tonumber( chapter )
 
    -- Return Lezhin link
    if (site == "lezhin") then
        if (anchor == "1") then
	    	LinkNumber = chapter
    	end
    	if (anchor == "1") or (chapter <= LATEST_LEZHIN) then
            LinkTxt = "[http://www.lezhin.com/ko/comic/dokgo/" .. LinkNumber .. " Lezhin]"
        else
            LinkTxt = "Not yet available on [http://www.lezhin.com/ko/comic/dokgo Lezhin]"
        end
    -- Return Mangacow link
    elseif (site == "mangacow") then
    	if (anchor == "1") then
	    	LinkNumber = chapter
    	end
        if (chapter <= LATEST_MANGACOW) then
            LinkTxt = "[http://mngcow.co/Dokgo/" .. LinkNumber .. " Mangacow]"
        else
            LinkTxt = "Not yet available on [http://mngcow.co/Dokgo/ Mangacow]"
        end
    end
    return LinkTxt
end
 
return p
--[[Category:Lua modules]]

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.