Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a26cec8e280519ef

Jump to content

Module:Domino Unicode

From Wikipedia, the free encyclopedia

local getArgs = require('Module:Arguments').getArgs

local p = {}

local hStart = tonumber('0x1f030');
local vStart = hStart + 50;

local function output(direction, num1, num2)
	direction = string.lower(direction);
	num1 = tonumber(num1);
	num2 = tonumber(num2);
	
	local start = hStart;
	if direction == 'h' or direction == 'horizontal' or direction == 'f' or direction == 'b' then
		start = hStart;		
	elseif direction == 'v' or direction == 'vertical' then
		start = vStart;
	else
		return '';
	end
	
	local charNum = start;
	if num1 == nil and num2 == nil then
		charNum = start;
	else
		if num2 == nil then
			num2 = num1;
		end
		charNum = start + 1 + (num1 * 7 + num2);
	end
	
	return string.format("%X", charNum);
end

function p.output(frame)
	local args = getArgs(frame);
	return output(args[1], args[2], args[3]);
end

return p;