Editing
Module
:
Tooltip
Give feedback
Jump to navigation
Jump to search
Warning:
You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more
.
Log in
or
create an account
to continue receiving notifications after this account expires, and to access other features.
Anti-spam check. Do
not
fill this in!
local p = {} local yn = require('Module:Yesno') local hc = require('Module:Paramtest').has_content -- module access point for div p._div = function(args) local name = args.name if not hc(name) then error('Name is required!') end local content = args.content local hasarrow = yn(args.arrow or 'yes', true) local arrowsize = tonumber(args.arrowsize) or 10 local limitwidthbool = yn(args.limitwidth or 'yes', true) local style = hc(args.style) and args.style or nil local div = mw.html.create('div') local arrow = 'no' if hasarrow then arrow = 'yes' end local limitwidth = 'no' if limitwidthbool then limitwidth = 'yes' end local attrs = { ['data-tooltip-for'] = name, ['data-tooltip-arrow'] = arrow, ['data-tooltip-arrow-size'] = arrowsize, ['data-tooltip-limit-width'] = limitwidth, } div :addClass('hidden js-tooltip-wrapper') :cssText(style) :css('display', 'none') :attr(attrs) :tag('div') :addClass('js-tooltip-text') :wikitext(content) :done() :done() return div end p._span = function(args) local name = args.name or args[1] or nil if not hc(name) then error('Name is required!') end local alt = args.alt or args[2] or '?' local span = mw.html.create('span') span:addClass('hidden js-tooltip-click') :css('display', 'none') :attr('data-tooltip-name', name) :wikitext(alt) :done() return span end -- template access points p.div = function(frame) return p._div(frame:getParent().args) end p.span = function(frame) return p._span(frame:getParent().args) end return p
Summary:
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Deadlock:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Page included on this page:
Module:Tooltip/doc
(
view source
)
Navigation menu
Personal tools
Create account
Log in
associated-pages
Module
Discussion
English
Views
Read
Edit source
History
Tools
Search
Discord
Discord
Navigation
Main page
About us
Random page
Special pages
Recent changes
Character Tech
1h ago
路
Kai
Character Tech
2h ago
路
Scorpio
DL:AF
2h ago
路
Kai
Shiv/Movement
5h ago
路
~2026-PhantomReturnEscalating1073
Show more...
Interface Admin
Common CSS
Vector CSS
Minerva CSS
Citizen CSS
Brown theme CSS
Gadgets
Gadgets definition
Editing
How to edit
Style guide
All guides
New files
Unresolved feedback
Tools
What links here
Related changes
Page information