Content deleted Content added
nop |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1:
local p = {}
local function urlencode(text)
Line 12 ⟶ 9:
end
local function
return mw.ustring.format(
'[%s <abbr title="%s">%s</abbr>]%s',
item:wikitext(p .. '[' .. u .. ' ')▼
url,
expansion,
display_text,
after or ''
)▼
end
Line 28 ⟶ 23:
wrappers = 'Template:Search'
})
local
local short_module_args = {
class = 'template-search plainlinks',
}▼
local long_module_args = {
class = 'template-search plainlinks',
make_link('https://en.wikipedia.org/w/index.php?title=Special:Search&search=' .. search_phrase_encoded, 'Wikipedia', 'wp'),
make_link('https://www.bing.com/search?q=' .. search_phrase_encoded, 'Bing', 'b', ' |'),
}▼
local long = (args.long or '') ~= ''
local ubl = require('Module:List').unbulleted
local list = ubl(long and long_module_args or short_module_args)
return frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Search/styles.css' }
▲ addlink('(', '//en.wikipedia.org/w/index.php?title=Special:Search&search=' .. ssenc, 'Wikipedia', 'wp', ' ')
▲ addlink('', 'https://www.google.com/search?q=site%3Awikipedia.org+' .. ssenc, 'Wikipedia over Google', 'gwp', ' ')
▲ addlink('', 'https://www.google.com/search?q=' .. ssenc, 'Google', 'g', ' ')
▲ addlink('', 'https://www.bing.com/search?q=site%3Awikipedia.org+' .. ssenc, 'Wikipedia over Bing', 'bwp', ' ')
▲ addlink('', 'https://www.bing.com/search?q=' .. ssenc, 'Bing', 'b', ' | ')
▲ addlink('', 'https://www.britannica.com/search?nop&query=' .. ssenc, 'Encyclopaedia Britannica', 'eb', ' ')
▲ addlink('', 'http://www.bartleby.com/cgi-bin/texis/webinator/65search?query=' .. ssenc, 'Columbia Encyclopedia', 'co', ' ')
▲ addlink('', 'https://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.pcmag.com%2Fencyclopedia_term%2F+' .. ssenc, 'PC Magazine Encyclopedia over Google', 'gct', ' ')
▲ addlink('', 'http://scienceworld.wolfram.com/search/index.cgi?as_q=' .. ssenc, 'World of Science', 'sw', ' ')
▲ addlink('', 'https://archive.org/search.php?query=' .. ssenc, 'Internet Archive', 'arc', ' ')
▲ addlink('', 'https://babel.hathitrust.org/cgi/ls?field1=ocr;q1=' .. ssenc .. ';a=srchls;lmt=ft', 'HathiTrust', 'ht', ')')
▲ addlink('', 'https://www.bing.com/search?q=' .. ssenc, 'Bing', 'b', ')')
end
|