From Dota 2 Wiki
Jump to: navigation, search

Documentation for Module:Tooltip Jump to code ↴ [ edit | purge ]

Reality Rift icon.png
▶️ Planeshift.
The documentation for this module can be found at Template:Tooltip.
You may be forwarded to another wiki language, in case a translation is not available.


local libraryUtil = require( 'libraryUtil' )
local getArgs = require( 'Module:Arguments' ).getArgs
local p = {}

function p.main( frame )
  local args = getArgs( frame, {
    wrappers = {
  return p._main( args )

function p._main( args )
  assert( args[1] and args[2], 'Missing argument' )
  local text = args[1]
  local title = mw.text.encode( args[2] )

  return string.format( '<span class="tooltip" title="%s" style="cursor: help; border-bottom: 1px dotted;">%s</span>', title, text )

return p