Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 

















Module:If preview/configuration






ि
Аԥсшәа
العربية

Asturianu
Авар
تۆرکجه
Basa Bali
 / Bân-lâm-gú
Беларуская
Беларуская (тарашкевіца)

Bosanski
Cebuano
Dansk
الدارجة
ދިވެހިބަސް
فارسی
Français
گیلکی
Хальмг

Հայերեն
ि
Ilokano
Íslenska
Kurdî
Magyar
ि
Македонски

Māori
مازِرونی
 
 / Mìng-dĕ̤ng-nḡ
Монгол

Na Vosa Vakaviti
Nederlands


Napulitano
Нохчийн
ି
Oʻzbekcha / ўзбекча


Português
Русский

Simple English
سنڌي
Slovenščina
کوردی
Suomi
ி
 

Türkçe
Türkmençe
Українська
اردو
Tiếng Vit

 

Edit links
 









Module
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikisource
 
















Appearance
   

 





Permanently protected module

From Wikipedia, the free encyclopedia
 

< Module:If preview

--[[
We perform the actual check for whether this is a preview here since
preprocessing is relatively expensive.
]]
local frame = mw.getCurrentFrame()

local function is_preview()
 local revision_id = frame:preprocess('{{REVISIONID}}')
 -- {{REVISIONID}} is usually the empty string when previewed.
 -- I don't know why we're checking for nil but hey, maybe someday things
 -- would have broken
 return revision_id == nil or revision_id == ''
end

local function templatestyles()
 return frame:extensionTag{
  name = 'templatestyles', args = { src = 'Module:If preview/styles.css' }
 }
end

return {
 preview = is_preview(),
 templatestyles = templatestyles(),
 warning_infrastructure = '%s<div class="preview-warning"><strong>Preview warning:</strong> %s</div>',
 missing_warning = 'The template has no warning text. Please add a warning.'
}

Retrieved from "https://en.wikipedia.org/w/index.php?title=Module:If_preview/configuration&oldid=1021623080"

Hidden category: 
Wikipedia template-protected modules
 



This page was last edited on 5 May 2021, at 18:56 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki