User:Ohconfucius/test/Sources subscript1.js

This is an old revision of this page, as edited by Ohconfucius (talk | contribs) at 02:18, 2 November 2012 (tweak). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
function Ohc_sourcename(){
 
//  source names to 'wikiname'
	var table = {
		'(?:ny ?times(?:\\.com|)|New York Times)':			'The New York Times',
		'iht(?:\\.com|\\b)':						'International Herald Tribune',
		'(?:wsj(?:\\.com|)|Wall Street Journal)':			'The Wall Street Journal',
		'newsday(?:\\.com)':						'Newsday',
		'(?:nydailynews(?:\\.com|)|(?:New York|NY) Daily ?News)':	'Daily News |___location=New York',
		'ny ?post(?:\\.com|)':						'New York Post',
		'baltimore ?sun(?:\\.com|\\b)':					'The Baltimore Sun',
		'(?:the ?|)boston ?(?:globe|)(?:\\.com|)':					'Boston Globe',
		'washington ?post(?:\\.com|)':					'The Washington Post',
		'washington ?times(?:\\.com|)':					'The Washington Times',
		'(?:la ?times(?:\\.com|)|L\\. ?A\\. Times)':			'Los Angeles Times',
		'(?:chicago ?|)sun[ -]?times(?:\\.com|)':			'Chicago Sun-Times',
		'chicagotribune(?:\\.com|)':					'Chicago Tribune',
		'miami ?herald(?:\\.com|)':					'The Miami Herald',
		'(?:chron|houstonchronicle)(?:\\.com|)':			'Houston Chronicle',
		'(?:sfgate|SF ?Chronicle)(?:\\.com|)':				'San Francisco Chronicle',
		'denver ?post(?:\\.com|)':					'The Denver Post',
		'contracostatimes(?:\\.com|)':					'Contra Costa Times',
		'freep(?:\\.com|)':						'Detroit Free Press',
		'newsday(?:\\.com|)':						'Newsday',
		'insidebayarea(?:\\.com|)':					'Oakland Tribune',
		'philly\\.com':						'Philadelphia Daily News',
		'mercurynews(?:\\.com|)':					'San Jose Mercury News',
		'startribune(?:\\.com|)':					'Star Tribune',
		'tampabay(?:times|)(?:\\.com|)':				'Tampa Bay Times',
		'(?:azcentral|az ?republic)(?:\\.com|)':			'The Arizona Republic',
		'dallasnews(?:\\.com|)':					'The Dallas Morning News',
		'oregonlive(?:\\.com|)':					'The Oregonian',
		'philly\\.newspaperdirect\\.com':				'The Philadelphia Inquirer',
		'(?:cleveland(?:\\.com)|plain ?dealer)':			'The Plain Dealer',
		'(?:utsandiego(?:\\.com|)|(?:the |)San Diego Union[- ]Tribune)':		'U-T San Diego',
		'seattle ?times(?:\\.com|)':					'The Seattle Times',
		'\\bnj(?:\\.com)':						'The Star-Ledger',
		'usatoday(?:\\.com|)':						'USA Today',
		'Independent\\.com':						'Santa Barbara Independent',
		'(?:Christian ?Science ?Monitor|csmonitor)(?:\\.com|)':		'The Christian Science Monitor',
		'Christian ?post(?:\\.com|)':					'The Christian Post',
		'bizjournals(?:\\.com|)':					'The Business Journals',
		
		'smh(?:\\.com\\.au|)':						'Sydney Morning Herald',  
		'The Sydney Morning Herald':						'Sydney Morning Herald',  
		'theage(?:\\.com\\.au|)':					'The Age',
		'theaustralian(?:\\.com\\.au|)':				'The Australian',
		'canberra ?times(?:\\.com\\.au|)':				'The Canberra Times',
		'(?:the ?|)herald ?sun(?:\\.com\\.au|)':					'Herald Sun',
		'nzherald(?:\\.co\\.nz|\\.com|)':				'The New Zealand Herald',
		'New Zealand Herald':						'The New Zealand Herald',
 
		'(?:(?:the|)globeandmail(?:\\.com|)|globe & mail)':		'The Globe and Mail',
		'(?:the ?|)(?:Toronto |)Globe and Mail':					'The Globe and Mail',
		'(?:the |)montreal ?gazette(?:\\.com|)': 'The Gazette |___location=Montreal',
		'(?:the ?|)national ?post(?:\\.com|)':					'National Post',
		'(?:the ?|)ottawa ?citizen(?:\\.com|)':					'Ottawa Citizen',
		'theprovince(?:\\.com|)':					'The Province',
		'thestar(?:\\.com)':						'Toronto Star',
		'(?:the |)toronto ?sun(?:\\.com|)':					'Toronto Sun',
		'vancouver ?sun(?:\\.com|\\b)':					'The Vancouver Sun',
		'(?:the ?|)Winnipeg ?free ?press(?:\\.com|)':					'Winnipeg Free Press',
 
		'euobserver(?:\\.com|)':					'EUobserver',
		'(?:(?:Daily |)Telegraph|telegraph\\.co\\.uk)':			'The Daily Telegraph',
		'Sunday Telegraph':						'The Sunday Telegraph',
		'(?:Timesonline.co(?:\\.uk|m)|Times ?online)':			'The Times',
		'(?:the ?|)(?:financial ?times|\\bft)(?:\\.com|\\.co\\.uk|)':		'Financial Times',
		'(?:guardian(?:\\.co\\.uk| unlimited|))':			'The Guardian',
		'(?:thescotsman(?:\\.com|)|Scotsman)':				'The Scotsman',
		'Independent(?:\\.co\\.uk)':					'The Independent',
		'(?:the (?:Daily |)Express|Express\\.co\\.uk)': 		'Daily Express',
		'(?:the (?:Daily |)Mirror|(?:the|)Mirror\\.co\\.uk)': 		'Daily Mirror',
		'(?:dailymail(?:\\.co\\.uk|)|the Daily Mail|Mail Online)':	'Daily Mail',
		'(?:dailystar(?:\\.co\\.uk|)|the Daily Star)':			'Daily Star',
		'thesun(?:\\.co\\.uk|)':					'The Sun',
		'(?:thisis(?:london|money)\\.co\\.uk|this is london)':		'Evening Standard |___location=London',
		'(?:the |)(?:London |)evening standard':		'Evening Standard |___location=London',
		'(?:irish ?|)independent\\.ie':					'The Irish Independent',
		'irish ?times(?:\\.com|\\.ie|)':				'The Irish Times',
		'j(?:erusalem ?|)post(?:\\.co(?:\\.il|m)|)':			'The Jerusalem Post',
		'(?:the |)Buenos ?Aires ?Herald(?:\\.com|)':				'Buenos Aires Herald',
 
		'(?:the |)business[\\- ]standard(?:\\.com|)':				'Business Standard',
		'(?:the |)deccan ?chronicle(?:\\.com|)':				'Deccan Chronicle',
		'(?:the |)deccan ?herald(?:\\.com|)':					'Deccan Herald',
		'Economic ?Times(?:\\.com|)':					'The Economic Times',
		'mydigitalfc(?:\\.com|)':					'Financial Chronicle',
		'financial ?express(?:\\.com|)':				'The Financial Express',
		'(?:the ?|)Hindustan ?times(?:\\.com|)':				'Hindustan Times',
		'(?:the)?hindu(?:\\.com|)':					'The Hindu',
		'(?:the)?hindubusinessline(?:\\.com|)':			'Business Line',
		'Indian ?Express(?:\\.com|)':					'The Indian Express',
		'express(?:india\\.com)':					'The Indian Express',
		'Expressbuzz(?:\\.com|)':					'The New Indian Express',
		'dailypioneer(?:\\.com|)':					'The Pioneer',
		'Thestatesman(?:\\.net|)':					'The Statesman',
		'Telegraphindia(?:\\.com|)':				'The Telegraph',
		'Times ?of ?india(?:(?:\\.indiatimes|)\\.com|)':		'The Times of India',
		'tribuneindia(?:\\.com|)':					'The Tribune',
		'brecorder(?:\\.com|)':						'Business Recorder',
		'dailytimes(?:\\.com\\.pk|)':					'Daily Times',
		'dawn ?newspapers?(?:\\.com|)':					'Dawn',
		'dawn(?: ?newspapers?|)(?:\\.com|)':				'Dawn',
		'frontier ?post(?:\\.com\\.pk|)':					'The Frontier Post',
		'nation(?:\\.com\\.pk)':					'The Nation',
		'dailynht(?:\\.com|) ':						'National Herald Tribune',
		'thenews(?:\\.com\\.pk)':					'The News International',
		'pakobserver(?:\\.net|)':					'Pakistan Observer',

		'(?:asia ?|\\ba)Times(?:\\.com|)':					'Asia Times',
		'(?:The ?|)China ?Post(?:\\.com\\.tw|)':				'China Post',
		'Chinadaily(?:\\.com\\.cn|)':					'China Daily',
		'chinadigitaltimes(?:\\.com|\\.net|)':				'China Digital Times',
		'(?:the ?|)global ?times(?:\\.cn|)':					'Global Times',
		'(?:the|)jakartapost(?:\\.com|)':				'The Jakarta Post',
		'(?:the ?|)jakarta ?globe(?:\\.com|)':				'Jakarta Globe',
		'(?:The ?|)Japan ?Times(?:\\.com|)':				'Japan Times',
		'people(?:daily|)(?:\\.com\\.cn)':				'People\'s Daily',
		'peopledaily':							'People\'s Daily',
		'prague ?post(?:\\.com|)':					'The Prague Post',
		'scmp(?:\\.com|)':						'South China Morning Post',
		'(?:thestandard(?:\\.com\\.hk|)|hk standard)':			'The Standard',
		'(?:The|)StraitsTimes(?:\\.com|)':				'The Straits Times',
		'(?:The|)TaipeiTimes(?:\\.com|)':				'Taipei Times',

		//News business politics magazines
		'Businessweek(?:\\.com|)':					'Bloomberg BusinessWeek',
		'Economist(?:\\.co\\.uk|\\.com)':				'The Economist',
		'Forbes(?:\\.com| magazine)':				'Forbes',
		'Fortune(?:\\.com| magazine)':				'Fortune',
		'Foreignaffairs(?:\\.com|)':				'Foreign Affairs',
		'(?:the |)New ?Statesman(?:\\.co.uk|\\.com)':				'New Statesman',
		'Newsweek(?:\\.com| magazine)':					'Newsweek',
		'Spectator(?:\\.co\\.uk|)':					'The Spectator',
		'Time(?:\\.com| magazine|\\b)':					'Time',
		'The ?nation(?:\\.com| magazine)':				'The Nation',
 
		//general interest, sport leisure lifestyle
		'(?:(?:ew|entertainmentweekly)(?:\\.com))':			'Entertainment Weekly',
		'people(?:\\.com)':						'People',
		'(?:the |)radio ?times(?:\\.co.uk|\\.com|)':				'Radio Times',
		'TVguide(?:\\.com|)':						'TV Guide',
		'Hello ?magazine(?:\\.com|)':					'Hello!',
		'nymag(?:\\.com|)':						'New York',
		'new ?yorker(?:\\.com|)':						'The New Yorker',
		'OK!? ?magazine(?:\\.com|)':					'OK!',
		'Usmagazine(?:\\.com|)':					'Us Weekly',
 
		//new media with original content
		'(?:the ?|)huffington ?post(?:\\.com|)':					'Huffington Post',
		'digitalspy(?:\\.co\\.uk|\\.com|)':				'Digital Spy',
		'theregister(?:\\.co\\.uk|\\.com|)':				'The Register',
 
		//arts & lit
		'Aesthetica ?magazine(?:\\.com|)':			'Aesthetica',
		'Allmusic(?:\\.com|)':					'Allmusic',
		'Alt ?Press(?:\\.com|)':				'Alternative Press',
		'Apollo[\\- ]?magazine(?:\\.com|)':			'Apollo',
		'Art ?and ?Antiques mag(?:azine|)(?:\\.com|)':		'Art & Antiques',
		'Art ?in ?America ?magazine(?:\\.com|)':		'Art in America',
		'Art ?Monthly(?:\\.co\\.uk)':				'Art Monthly',
		'Artinfo(?:\\.com|)':					'Art+Auction',
		'Artforum(?:\\.com|)':					'Artforum',
		'Artist ?Profile(?:\\.com\\.au)':			'Artist Profile',
		'Artlink(?:\\.com\\.au)':				'Artlink',
		'ARTnews(?:\\.com|)':					'ARTnews',
		'ArtReview(?:\\.com|)':					'ArtReview',
		'(?:The ?|)Asia ?Literary ?Review(?:\\.com|)':			'Asia Literary Review',
		'(?:The ?|)Australian ?Book ?Review(?:\\.com|)':			'Australian Book Review',
		'classical-Music(?:\\.com|)':				'BBC Music Magazine',
		'bombsite(?:\\.com|)':					'BOMB Magazine',
		'Bookforum(?:\\.com|)':					'Bookforum',
		'Border ?Crossings ?mag(?:azine|)(?:\\.com|)':		'Border Crossings',
		'Brick ?mag(?:azine|)(?:\\.com|)':			'Brick',
		'notesandqueries(?:\\.ca|)':				'Canadian Notes & Queries',
		'asiancha(?:\\.com|)':					'Cha: An Asian Literary Journal',
		'Chapman-pub(?:\\.co\\.uk)':				'Chapman',
		'Clashmusic(?:\\.com|)':				'Clash',
		'crq(?:\\.org\\.uk|)|Classic Record Collector':		'Classical Recordings Quarterly',
		'Contemporary[\\- ]?mag(?:azine|)(?:\\.com|)':		'Contemporary',
		'Drowned ?in ?Sound(?:\\.com|)':			'Drowned in Sound',
		'Exclaim(?:\\.ca|)':					'Exclaim!',
		'Flash ?Art ?online(?:\\.com|)':			'Flash Art',
		'frieze(?:\\.com|)':					'frieze',
		'Gangway(?:\\.net|)':					'Gangway',
		'Geist(?:\\.com|)':					'Geist',
		'GHLL(?:\\.com|)':					'GHLL',
		'Grain ?magazine(?:\\.ca|)':				'Grain',
		'Gramophone(?:\\.co\\.uk|\\.net|)':			'Gramophone',
		'Granta(?:\\.com|)':					'Granta',
		'Hot ?Press(?:\\.com|)':				'Hot Press',
		'moreIntelligentLife(?:\\.com|)':			'Intelligent Life',
		'(?:The ?|)Irish ?Pages(?:\\.org|)':				'Irish Pages',
		'kerrang(?:\\.com| magazine)':				'Kerrang!',
		'Lapham\'s ?Quarterly(?:\\.org|)':			'Lapham\'s Quarterly',
		'Limelight(?:\\.com\\.au)':				'Limelight',
		'Literary ?Review(?:\\.co\\.uk)':			'Literary Review',
		'Meanjin(?:\\.com|)':					'Meanjin',
		'Melodic(?:\\.net|)(?:\\.com|)':			'Melodic.net',
		'Mixmag(?:\\.net|)':					'Mixmag',
		'Modern ?Painters(?:\\.com)':				'Modern Painters',
		'Mojo(?:4music\\.com| magazine)':				'Mojo',
		'Muse ?mag(?:azine|)(\\.hk)':				'Muse',
		'musicOMH(?:\\.com)':					'musicOMH',
		'MusicRadar(?:\\.com)':				'MusicRadar',
		'nplusonemag(?:\\.com|)':				'n+1',
		'New ?Welsh ?Review(?:\\.com|)':			'New Welsh Review',
		'(?:NME(?:\\.com|)|New Musical Express)':		'NME',
		'Opera(?:\\.co\\.uk)':					'Opera',
		'Opera ?Canada(?:\\.ca|)':				'Opera Canada',
		'Opera ?News(?:\\.com|)':				'Opera News',
		'Oxford ?Poetry(?:\\.co\\.uk)':				'Oxford Poetry',
		'Pitchfork(?:\\.com|)':					'Pitchfork Media',
		'Pshares(?:\\.org|)':					'Ploughshares',
		'Poetry ?magazine(?:\\.org|)':				'Poetry',
		'Poetry ?Ireland\\.ie':					'Poetry Ireland Review',
		'Poetry(?:\\.co\\.uk)':					'Poetry London',
		'poetry ?salzburg(?:\\.com|)':				'Poetry Salzburg Review',
		'pw(?:\\.org|)':					'Poets & Writers',
		'PopMatters(?:\\.com|)':				'PopMatters',
		'q(?:themusic\\.com| magazine)':			'Q',
		'Rolling ?stone(?:\\.com| magazine)':			'Rolling Stone',
		'Spin ?(?:magazine|)(?:\\.com|)':			'Spin',
		'Sputnikmusic(?:\\.com|)':				'Sputnikmusic',
		'Tate(?:\\.org\\.uk|)':					'Tate Etc.',
		'aprweb(?:\\.org|)':					'The American Poetry Review',
		'painters-online(?:\\.co\\.uk|)':			'The Artist',
		'Believer ?mag(?:azine|)(?:\\.com|)':			'The Believer',
		'(?:The |)Brooklyn ?Rail(?:\\.org|)':			'The Brooklyn Rail',
		'Burlington(?:\\.org\\.uk|)':				'The Burlington Magazine',
		'The ?Fly(?:\\.co\\.uk)':				'The Fly',
		'ny ?Books(?:\\.com|)':					'The New York Review of Books',
		'(?:The ?|)Paris ?Review(?:\\.org|)':			'The Paris Review',
		'TheReader(?:\\.org\\.uk)':				'The Reader',
		'Stinging ?Fly(?:\\.org|)':				'The Stinging Fly',
		'the-tls(?:\\.co\\.uk|)':				'The Times Literary Supplement',
		'TheWire\\.co\\.uk':				'The Wire',
		'McSweeneys(?:\\.net|)':				'Timothy McSweeney\'s Quarterly Concern',
		'Tin ?House(?:\\.com|)':				'Tin House',
		'Uncut\\.co\\.uk':					'Uncut',
		'All-Story(?:\\.com|)':					'Zoetrope: All-Story',
 
		//special interest
		'(?:flight ?global(?:\\.com|))':			'Flight International',
		'(?:Hollywood ?Reporter(?:\\.com|))':			'The Hollywood Reporter',
		'(?:playbill(?:\\.com|))':				'Playbill',
		'(?:variety(?:\\.com| magazine))':			'Variety',
		'(?:vogue(?:\\.com| magazine))':			'Vogue',
		'(?:vanityfair(?:\\.com|))':				'Vanity Fair',
		'(?:nature(?:\\.com|))':				'Nature',
		'(?:science(?:\\.com|))':				'Science',
		'(?:scientificamerican(?:\\.com|))':			'Scientific American',
		'(?:hi-?fi ?news(?:\\.co\\.uk|))':			'Hi-Fi News & Record Review',
		'(?:stereophile(?:\\.com|))':				'Stereophile',
		'(?:theabsolutesound(?:\\.com|))':			'The Absolute Sound',
		'(?:newscientist(?:\\.com|))':				'New Scientist',
		'(?:Billboard(?:\\.com|\\.biz| magazine|))':		'Billboard',
		'(?:Empire ?(?:online(?:\\.com|)|magazine))':		'Empire',
		'(?:computer ?world(?:\\.com| magazine))':		'Computerworld',
		'(?:pc ?world(?:\\.com| magazine))':			'PC World',
		'(?:mac ?world(?:\\.com| magazine))':			'MacWorld',
		'(?:nationalgeographic(?:\\.com| magazine))':		'National Geographic',
		'(?:sportsillustrated(?:\\.cnn|)(?:\\.com))':		'Sports Illustrated',
		'(?:swimmingworldmagazine(?:\\.com))':		'Swimming World Magazine',
		'(?:Wired(?:\\.com| magazine))':			'Wired',
 
		//Professional
		'(?:Medicalnewstoday(?:\\.com|))':			'Medical News Today',
		'(?:publishersweekly(?:\\.com|))':			'Publishers Weekly',
		'(?:ad(?:vertising|\\s|)age(?:\\.com|))':		'Advertising Age',
		'(?:bmj(?:\\.com|))':					'BMJ',
		'(?:thelancet(?:\\.com|))':				'The Lancet',
 
		//Spanish-language dailies
		'abc\\.es':						'ABC |___location=Spain',
		'cincodias(?:\\.com|\\.es|)':			'Cinco Días',
		'elcorreo(?:\\.com|\\.es|)':			'El Correo',
		'eleconomista(?:\\.com|\\.es|)':			'El Economista',
		'elmundo(?:\\.es)':					'El Mundo |___location=Spain',
		'elmundo(?:\\.com)':				'El Mundo |___location=Colombia',
		'elmundodeportivo(?:\\.com|\\.es|)':		'Mundo Deportivo',
		'elpais(?:\\.com|\\.es|)':				'El País',
		'elperiodicodearagon(?:\\.com|\\.es|)':		'El Periódico',
		'estadiodeportivo(?:\\.com|\\.es|)':		'Estadio Deportivo',
		'expansion(?:\\.com|\\.es)':			'Expansión',
		'larazon(?:\\.com|\\.es|)':				'La Razón',
		'lavanguardia(?:\\.com|\\.es|)':			'La Vanguardia',
		'lavozdegalicia(?:\\.com|\\.es|)':			'La Voz de Galicia',
		'marca(?:\\.com|\\.es|)':				'Marca',
		'neg-ocio(?:\\.com|\\.es|)':			'Negocio & Estilo de Vida',
		'negocios(?:\\.com|\\.es|)':			'La Gaceta de los Negocios',
		'noticias-bolsa(?:\\.com|\\.es|)':			'Noticias Bolsa',
		'publico(?:\\.com|\\.es|)':				'Público',
		'quediario(?:\\.com|\\.es|)':			'Qué!',
		'sport(?:\\.com|\\.es|)':				'Sport |___location=Spain',
		'superdeporte(?:\\.com|\\.es|)':			'Super Deporte',
 
		//French-language dailies
		'la-croix(?:\\.com|\\.fr|)':				'La Croix',
		'lemonde(?:\\.com|\\.fr|)':				'Le Monde',
		'lefigaro(?:\\.com|\\.fr|)':				'Le Figaro',
		'liberation\\.fr':					'Libération',
		'humanite(?:\\.com|\\.fr|)':				'L\'Humanité',
		'francesoir(?:\\.com|\\.fr|)':			'France Soir',
		'mediapart(?:\\.com|\\.fr)':			'Mediapart',
		'lesechos(?:\\.com|\\.fr|)':				'Les Échos',
		'latribune(?:\\.com|\\.fr|)':			'La Tribune',
		'lequipe(?:\\.com|\\.fr|)':				'L\'Équipe',
		'20minutes(?:\\.com|\\.fr|)':			'20 Minutes',
		'directmatin(?:\\.com|\\.fr|)':			'Direct Matin',
		'directsoir(?:\\.com|\\.fr|)':			'Direct Soir',
		'metro\\.\\w{2,3}':					'Metro',
		'lecanardenchaine(?:\\.com|\\.fr|)':			'Le Canard enchaîné',
		'lenouvelobs(?:\\.com|\\.fr|)':			'Le Nouvel Observateur',
		'lexpress(?:\\.com|\\.fr|)':				'L\'Express',
		'lepoint(?:\\.com|\\.fr|)':				'Le Point',
		'marianne-en-ligne(?:\\.com|\\.fr|)':		'Marianne',
		'parismatch(?:\\.com|\\.fr|)':			'Paris Match',
		'telerama(?:\\.com|\\.fr|)':				'Télérama',
		'courrierinternational(?:\\.com|\\.fr|)':		'Courrier International',
		'minute-hebdo(?:\\.com|\\.fr|)':			'Minute',
		'ledevoir(?:\\.com|)':					'Le Devoir',
		'lesoleil(?:\\.com|)':					'Le Soleil',
		'lejournaldemontreal(?:\\.com|)':			'Le Journal de Montréal',
		'(?:la|cyber)presse(?:\\.com|\\.ca)':			'La Presse (Canadian newspaper)',
		'journaldequebec(?:\\.com|)':				'Le Journal de Québec',
 
		//German-language dailies
		'zeit(?:\\.de|)\\b':					'Die Zeit',
		'sueddeutsche(?:\\.de|)':				'Süddeutsche Zeitung',
		'\\bfaz(?:\\.net|)\\b':					'Frankfurter Allgemeine Zeitung',
		'\\bwelt(?:\\.de|\\b)':					'Die Welt',
		'\\bfr-online(?:\\.de|)':				'Frankfurter Rundschau',
		'tagesspiegel(?:\\.de|)':				'Der Tagesspiegel',
		'handelsblatt(?:\\.de)':				'Handelsblatt',
		'\\bftd(?:\\.de|\\b)':					'Financial Times Deutschland',
		'\\btaz(?:\\.de|\\b)':					'die Tageszeitung',
		'neues-deutschland(?:\\.de|)':				'Neues Deutschland',
		'jungefreiheit(?:\\.de|)':				'Junge Freiheit',
		'jungewelt(?:\\.de|)':					'Junge Welt',

		//Portuguese-language dailies
		'\\bfolha(?:\\.info|)\\b':				'Brasil em Folhas',
		'correiobraziliense(?:\\.com\\.br|)':			'Correio Braziliense',
		'\\bdm(?:\\.com\\.br)':					'Diário da Manhã',
		'\\bdou(?:\\.com\\.br)':					'Diário Oficial da União',
		'\\bem(?:\\.com\\.br)':					'Estado de Minas',
		'folha(?:\\.com\\.br|)':				'Folha de S. Paulo',
		'jbonline(?:\\.com\\.br|)':				'Jornal do Brasil',
		'estadao(?:\\.com\\.br|)':				'O Estado de S. Paulo',
		'oglobo.globo(?:\\.com|)':				'O Globo',
		'\\bzh(?:\\.com\\.br|)\\b':				'Zero Hora',

		//Other language dailies -Europe
		'blesk(?:\\.cz|)':					'Blesk',
		'ihned(?:\\.cz|)':					'Hospodářské noviny',
		'lidovky(?:\\.cz|)':					'Lidové noviny',
		'idnes(?:\\.cz|)':					'Mladá fronta DNES',
		'pravo.novinky(?:\\.cz|)':				'Právo',
		'haaretz\\.co(?:\\.il|m)':				'Haaretz',

		//Other language dailies -Asia
		'asahi\\.com':						'Asahi Shimbun',
		'yomiuri\\.co\\.jp':				'Yomiuri Shimbun',
		'appledaily(?:\\.com|)':				'Apple Daily',
		'hk\\.apple\\.nextmedia\\.com':				'Apple Daily',
		'ming ?pao(?:\\.com|)':					'Ming Pao',
		'oriental ?daily(?:\\.com\\.hk|)':			'Oriental Daily',
		'sing ?tao(?:\\.com|)':					'Sing Tao Daily',

		//News channels
		'bbc ?news(?:\\.co\\.uk|\\.com|)':				'BBC News',

		//Other language magazines
		'spiegel(?:\\.de|)':					'Der Spiegel',
		'wiwo(?:\\.de|)':					'Wirtschaftswoche'
	};
 
//  source names to 'wikiname' - unlinked
	var word, newWord;
	for (var word in table) {
	newWord = '$1' + table[ word ] + '$2';
	newWord2 = '$1\'\'' + table[ word ] + '\'\'$2';
	newWord3 = '$1\'\'\[\[' + table[ word ] + '\]\]\'\'$2';
		var txt="";
		try {
			var re = new RegExp('((?:author|agency|journal|newspaper|periodical|publisher|work)[ ]*=[ ]*)(?:[\\w\\.]+\\.|)' + word + '(?:,? online|)([\\s\\.]*[\\|\\}])', 'gi');
			regex(re, newWord);
		//  source names to 'wikiname', without delinking - linked (simple, without pipes)
			var re = new RegExp('((?:author|agency|journal|newspaper|periodical|publisher|work)[ ]*=[ ]*\\[\\[)(?:[\\w\\.]+\\.|)' + word + '(?: online|)(\\]\\][\\s\\.]*[\\|\\}])', 'gi');
		//  source names to 'wikiname', without delinking - linked (with pipes)
			var re = new RegExp('((?:author|agency|journal|newspaper|periodical|publisher|work)[ ]*=[ ]*\\[\\[(?:[^\\|\\]]*\\||))(?:[\\w\\.]+\\.|)' + word + '(?: online|)(\\]\\][\\s\\.]*[\\|\\}])', 'gi');
			regex(re, newWord);

		//  source names to 'wikiname' - unlinked; outside citation templates
			var re = new RegExp('(<ref[^>]*>[^<]+?\\s\'\')' + word + '(?: online|)(\'\'[^<]*?<\\/ref>)', 'gi');
			regex(re, newWord);
		//  source names to italicised 'wikiname' - unlinked; outside citation templates
			var re = new RegExp('(<ref[^>]*>[^<]+?[\\]\\.,;]\\s+)' + word + '(?: online|)([^\\]<]*?<\\/ref>)', 'gi');
			regex(re, newWord2);  //NOTE:  adaptation to italicise is built into 'newWord2'
		//  source names to italicised 'wikiname' - linked, unpiped; outside citation templates
			var re = new RegExp('(<ref[^>]*>[^<]+?[\\]\\.,;]\\s+)\\[\\[' + word + '(?: online|)\\]\\]([^<]*?<\\/ref>)', 'gi');  
			regex(re, newWord3);  //NOTE:  adaptation to re-italicise linked sources is built into 'newWord3'
		}
		catch(err) {
			txt="There was an error on function Ohc_sourcename(), when changing '"+ word + "' => '"+ table[word] +"'.\n\n";
			txt+="Error: " + err.message + "\n\n";
			txt+="Click OK to continue.\n\n";
			alert(txt);
		}
	}
 
//News agencies 
	var table = {
		'(?:ap(?:\\.org|\\.com|)|Associated Press)':	'Associated Press',
		'(?:afp(?:\\.com|)|Agence France[- ]Presse?)':	'Agence France-Presse',
		'kyodo ?news(?:\\.com|\\.jp|)':			'Kyodo News',
		'pr ?newswire(?:\\.com|)':			'PR Newswire',
		'reuters(?:\\.com|)':				'Reuters',
		'(?:rian(?:\\.com|\\.ru|)|RIA ?Novosti)':	'RIA Novosti',
		'xinhua(?:\\.com|\\.com\\.cn|)':		'Xinhua News Agency'
 
	};
 
	var word, newWord;
	for (var word in table) {
	newWord = 'agency$1' + table[ word ] + '$2';
    		var txt="";
		try {
		//  source names that are agencies - linked  –>unlinked
			var re = new RegExp('(?:author|agency|journal|newspaper|periodical|publisher|work)([ ]*=[ ]*\\[\\[)(?:[\\w\\.]+\\.|)' + word + '(\\]\\][\\s\\.]*[\\|\\}])', 'gi');
			    regex( re, newWord );

		//  source names that are agencies - unlinked
			var re = new RegExp('(?:author|agency|journal|newspaper|periodical|publisher|work)([ ]*=[ ]*)(?:[\\w\\.]+\\.|)' + word + '([\\s\\.]*[\\|\\}])', 'gi');
			    regex( re, newWord );

		}
		catch(err) {
			txt="There was an error on function Ohc_sourcename(), when changing '"+ word + "' => '"+ table[word] +"'.\n\n";
			txt+="Error: " + err.message + "\n\n";
			txt+="Click OK to continue.\n\n";
			alert(txt);
		}
	}
//Broadcasters 
	var table = {
		//Broadcasters
		'abc(?:\\.go|)\\.com':					'American Broadcasting Company',
		'abc\\.(?:com\\.au|net(?:\\.au|))':			'Australian Broadcasting Corporation',
		'abcnews(?:\\.com|)':					'ABC News',
		'aljazeera(?:\\.com|)':					'Al Jazeera',
		'bbc(?:\\.co\\.uk|\\.com)':					'BBC',
		'cbc(?:\\.ca|)':					'Canadian Broadcasting Corporation',
		'channel4(?:\\.co\\.uk|\\.com|)':			'Channel 4',
		'channel5(?:\\.co\\.uk|\\.com|)':			'Channel 5',
		'cnbc\\.com':						'CNBC',
		'cbs\\.com':						'CBS',
		'(?:espn ?|)cricinfo(?:\\.com|)':				'ESPNcricinfo',
		'soccernet(?:\\.espn:\\.go|)\\.com':				'ESPN FC',
		'espn(?:\\.com|)':				'ESPN',
		'foxnews(?:\\.com?|)':					'Fox News',
		'msnbc(?:\\.com?|)':			'MSNBC',
		'nbcnews(?:\\.com?|)':			'NBC News',
		'rthk\\.hk':						'RTHK',
		'sky(?:news|)(?:\\.com?|)':					'Sky News',
		'books\\.google(?:\\.com?|)(?:\\.[\\w]{2}|)':		'Google Books',
 
//Sporting bodies
		'\\bchl(?:\\.ca?|\\b)':						'Canadian Hockey League',
		'fifa(?:\\.com?|\\b)':						'FIFA',
		'fina(?:\\.com?|\\b)':						'FINA',
		'(?:the ?|)football[\\- ]league(?:\\.co\\.uk|)':						'The Football League',
		'\\birb(?:\\.com?|\\b)':						'International Rugby Board',
		'\\bmlb(?:\\.com?|\\b)':						'Major League Baseball',
		'minorleaguebaseball(?:\\.com?|)':						'Minor League Baseball',
		'\\bnba(?:\\.com?|\\b)':						'National Basketball Association',
		'olympic(?:\\.org?|)':						'International Olympic Committee',
		'Premierleague.com(?:\\.com?|)':						'Premier League',
		'nfl(?:\\.com?|)':						'National Football League',
		'nhl(?:\\.com?|)':						'National Hockey League',
		'pgatour(?:\\.com?|)':						'PGA Tour',
		'\\brfu(?:\\.com?|)':						'Rugby Football Union',
		'uefa(?:\\.com?|)':						'UEFA',
		'wimbledon(?:\\.com?)':						'The Championships, Wimbledon',


// Major portals: beware 
//		'(?:cnn\\.com)':					'CNN',
//		'(?:yahoo\\.com)':					'Yahoo!',
//		'(?:google\\.com)':					'Google',

		'espn(?:\\.go|)\\.com':					'ESPN',
		'europa(?:\\.com|)\\.eu':					'Europa',
		'mtv(?:\\.com?|)(?:\\.[\\w]{2}|)':					'MTV',
		'rediff\\.com':						'Rediff.com',
		'vh1\\.com':						'VH1'
 
	};
 
// Broadcasters 
	var word, newWord;
	for (var word in table) {
	newWord = 'publisher$1' + table[ word ] + '$2';
	newWord3 = '$1\[\[' + table[ word ] + '\]\]$2';
		var txt="";
		try {
		// Broadcasters - linked
			var re = new RegExp('(?:author|agency|journal|newspaper|periodical|publisher|work)([ ]*=[ ]*\\[\\[)(?:[\\w\\.]+\\.|)' + word + '(\\]\\][\\s\\.]*[\\|\\}])', 'gi');
		// Broadcasters - unlinked
			var re = new RegExp('(?:author|agency|journal|newspaper|periodical|publisher|work)([ ]*=[ ]*)(?:[\\w\\.]+\\.|)' + word + '([\\s\\.]*[\\|\\}])', 'gi');
			regex(re, newWord);
		//  source names to 'wikiname' - unlinked; outside citation templates (deitalicising)
			var re = new RegExp('(<ref[^>]*>[^<]+?\\s)\'\'' + word + '(?: online|)\'\'([^<]*?<\\/ref>)', 'gi');
			regex(re, newWord);
 
		//  source names to unitalicised 'wikiname' - linked, unpiped; outside citation templates
			var re = new RegExp('(<ref[^>]*>[^<]+?[\\]\\.,;]\\s+)\\[\\[' + word + '(?: online|)\\]\\]([^<]*?<\\/ref>)', 'gi');  
			regex(re, newWord);  
		//  source names to 'wikiname' - linked, unpiped; outside citation templates(deitalicising)
			var re = new RegExp('(<ref[^>]*>[^<]+?[\\]\\.,;]\\s+)\'\'\\[\\[' + word + '(?: online|)\\]\\]\'\'([^<]*?<\\/ref>)', 'gi');  
			regex(re, newWord3);  //NOTE:  adaptation to italicise linked is built into 'newWord3'
		}
		catch(err) {
			txt="There was an error on function Ohc_sourcename(), when changing '"+ word + "' => '"+ table[word] +"'.\n\n";
			txt+="Error: " + err.message + "\n\n";
			txt+="Click OK to continue.\n\n";
			alert(txt);
		}
	}
	setreason('Source names and italicisation', 'appendonce');
}