Changes

Jump to: navigation, search

MediaWiki:Wiki.js

6,175 bytes added, 09:52, 5 July 2019
no edit summary
 
$(document).ready(function() {
$(".external.text").removeClass('external');
/*$('a[target="_blank"]').removeAttr('target');*/
$('.infoheader a').attr('target', '_blank');
$('.readfull_artical').attr('target', '_blank');
/*var company2_set_height = $(".sitedesc").height();
var template_Comparabily = $("#rating_div_Comparabily").height();
var company2_set_height = company2_set_height + template_Comparabily + 550590; $("#set_min_height").css({'min-height':company2_set_height + 'px'});*/
$("'#ceo_img_default').on("error", function() { $(this).attr('onErrorsrc', '/w/skins/images/NoImage.png');});$('#img_default').on("error", function() { $(this).onerror=nullattr('src', '/w/skins/images/NoImage.png');});$('#img_default1').on("error", function() { $(this).attr('src=', '/w/skins/images/NoImage.png');});
var keyname = $("#keywordcustomer").text();
$('#n-Wikiprofile a').attr('target', '_blank');
  if(mw.config.get('wgPageName ') != "WikiProfile"){ if(mw.config.get('wgNamespaceNumber ') == 0 || mw.config.get('wgNamespaceNumber ') == 777 || mw.config.get('wgNamespaceNumber ') == 100){
var wikiHTML;
//var page = wgPageName;
//var page = "Viewsonic";
if(mw.config.get('wgNamespaceNumber ') == 777){ var page = mw.config.get('wgPageName');
page = page.replace("Wiki:","");
}
if(mw.config.get('wgNamespaceNumber ') == 100){ var page = mw.config.get('wgPageName');
page = $("#wikipCname").html();
}
data:{pagename:page},
type: 'GET',
success:function(data){
var response = data;
if((data || data.error) && data!="" && typeof data !="undefined"){
$("#cse").html(data);
$("#wiki_description").css('display','block');/*if($('#temp_company').val()=='company3' || $('#temp_company').val()=='Company3'){*/ $("table.infobox.vcard tbody tr").each(function () { var textval = $(this).find("th").eq(0).text(); var ddlval = $(this).find("td").eq(0).html(); if( typeof textval!='undefined' && typeof ddlval!='undefined' && textval!="" && ddlval!="" ){ if(textval=="Industry") { console.log($(ddlval).find('li').length); $(ddlval).find('li').each(function () { $('.industry_keywords_div').append('<span>'+$(this).text()+'</span>'); });  } else{ $('.company_profile_details_main_div').append('<div class="para"><div class="lable">'+textval+'</div><div class="span2">'+ddlval+'</div></div>'); } } }); if( typeof $(".logo .image").html()!='undefined' && $(".logo .image").html()!="") { $('.company-right-logo').html('<a rel="nofollow noreferrer noopener" class=" text" href="/wiki/'+mw.config.get('wgPageName')+'">'+$(".logo .image").html()+'</a'); $('.company-right-logo img').addClass('company-right-img'); $('.company-right-logo img').attr('alt',page.replace("_"," ") ); } /*}*/ for(var i=0;i<$("#cse .mw-parser-output").children('table').length;i++){var tableElement = $("#cse .mw-parser-output").children('table').eq(i); $(".right_wikitable").append(tableElement.clone());}; /*setTimeout(function(){
$(".image img").fadeIn("fast");
var info=($("table.infobox.vcard").length>0)?$("table.infobox.vcard").height():0; var box=($("table.infobox.biota").length>0)?$("table.infobox.biota").height():0; var c_Rockyinfobox =($("table.infobox.vevent").length>0)?$("table.infobox.vevent").height():0; var c_samsunginfobox_navbox =($("table.vertical-navbox.nowraplinks.hlist").length>0)?$("table.vertical-navbox.nowraplinks.hlist").height()+200:0; var c_pepsi infobox_hproduct = ($("table.infobox.hrecipe.hproduct").length>0)?$("table.infobox.hrecipe.hproduct").height():0; var infobox_biodata = ($("table.infobox biota").length>0)?$("table.infobox biota").height():0;   (document.getElementsByClassName("infobox")[1])?document.getElementsByClassName("infobox")[1].style.top = (info+55)+"px":0; ($("table.vertical-navbox.nowraplinks.hlist").length>0)?$("table.vertical-navbox.nowraplinks.hlist").css('top',info+230):0; var infobox_navbox_vcard = ($("table.vertical-navbox.vcard.plainlist").length>0)?$("table.vertical-navbox.vcard.plainlist").height():0; ($("table.vertical-navbox.vcard.plainlist").length>0)?$("table.vertical-navbox.vcard.plainlist").css('top',info+180):0;
if($("table.collapsible.collapsed").height() != null)
{
$(".infobox").addClass('comp_tab_second');
var c_asustable_collapsible =$("table.collapsible.collapsed").height() + 520; /* var c_asus=$("table.infobox.comp_tab_second").height();*/
var tab_second_css = info + 20;
var totinfo = info + c_asus table_collapsible - 220;
$("#desc").css({'min-height':totinfo + 'px'});
$(".infobox.comp_tab_second").css({'margin-top':tab_second_css + 'px'});
else{
var totinfo = 240+info + c_samsung infobox_navbox_vcard + infobox_navbox + infobox_hproduct + infobox_biodata + c_pepsi infobox+ c_Rocky box - 220;
var box = box - 220;
$("#desc").css({'min-height':totinfo + 'px'});
$("#desc").css({'min-height':box + 'px'}); $("#mw-content-text").css({'min-height':info totinfo + 'px'});
}
   }, 20001000);*/
}else{
page = encodeURIComponent(page );page = page.charAt(0).toUpperCase() + page.slice(1);
name = page;
if(name != ""){
name = name.replace(/ /g,"_");
var v1="httphttps://en.wikipedia.org/w/api.php?section=0&action=parse&page=";
var v2="&format=json&redirects=content|format=Wiki|data=wikitext=text&prop=text&callback=?";
var url=v1+page+v2;
console.log(page);
$.getJSON(url,function(data){
wikiHTML = data.parse.text["*"];
if(wikiHTML.indexOf('<b>'+page+'</b> may refer to:')>0)
{
wikiHTML="";
}
wikiHTML =wikiHTML.replace(/wiki\//g, "wiki/Wiki:");
}
else{ wikiHTML = data.error; }
$wikiDOM = $("<document>"+wikiHTML+"</document>");
if(wikiHTML != ''&& typeof wikiHTML!="undefined" ){
$("#cse").html(wikiHTML);
$("#wiki_description").css('display','block'); for(var i=0;i<$("#cse .mw-parser-output").children('table').length;i++){var tableElement = $("#cse .mw-parser-output").children('table').eq(i); $(".right_wikitable").append(tableElement.clone());};   
if($("table.infobox.geography.vcard").height() == null){
}
var info=box+10;
if($('#temp_company').val()=='company3' || $('#temp_company').val()=='Company3')
{
$("table.infobox.vcard tbody tr").each(function () {
var textval = $(this).find("th").eq(0).text();
var ddlval = $(this).find("td").eq(0).html();
if( typeof textval!='undefined' && typeof ddlval!='undefined' && textval!="" && ddlval!="" ){
if(textval=="Industry")
{
$(ddlval).find('li').each(function () {
$('.industry_keywords_div').append('<span>'+$(this).text()+'</span>');
});
}
else{
$('.company_profile_details_main_div').append('<div class="para"><div class="lable">'+textval+'</div><div class="span2">'+ddlval+'</div></div>');
}
}
});
if( typeof $(".logo .image").html()!='undefined' && $(".logo .image").html()!="")
{
$('.company-right-logo').html('<a rel="nofollow noreferrer noopener" class="external text" href="/wiki/'+mw.config.get('wgPageName')+'">'+$(".logo .image").html()+'</a');
$('.company-right-logo img').addClass('company-right-img');
$('.company-right-logo img').attr('alt',page.replace("_"," ") );
}
}
 
$("#desc").css({"min-height":info + "px"} );
url: '/w/insertWikidata.php',
data:{pagename:mw.config.get('wgPageName'),page_content: WikiContent},
type: 'POST',
success:function(data){ /* dis_jobs();*/ /* setTimeout(function(){
$(".image img").fadeIn("fast");
var wikiheight=$("table.infobox.vcard").height();
var c_pepsi = $("table.infobox.hrecipe.hproduct").height();
var main = wikiheight + c_pepsi - 220;
$("#mw-content-text").css({'min-height':wikiheight + 'px'});
$("#desc").css({'min-height':main + 'px'});
   var wikiheight=($("table.infobox.vcard").length>0)?$("table.infobox.vcard").height():0; var c_pepsi = ($("table.infobox.hrecipe.hproduct").length>0)?$("table.infobox.hrecipe.hproduct").height():0;  var indeed_comp = ($("table.infobox.vevent").length>0)?$("table.infobox.vevent").height():0; var infobox_navbox_vcard = ($("table.vertical-navbox.vcard.plainlist").length>0)?$("table.vertical-navbox.vcard.plainlist").height()+240:0; ($("table.vertical-navbox.vcard.plainlist").length>0)?$("table.vertical-navbox.vcard.plainlist").css('top',wikiheight+175):0;   var main = wikiheight + c_pepsi + infobox_navbox_vcard - 220+50; var indeed_set_height = indeed_comp - 160; $("#mw-content-text").css({'min-height':wikiheight + 'px'}); $("#desc").css({'min-height':main + 'px'}); $("#desc").css({'min-height':indeed_set_height + 'px'}); }, 20001000);*/
}
url: '/insertWikidata.php',
data:{pagename:mw.config.get('wgPageName'),page_content: data.parse.text["*"]},
type: 'POST',
success:function(data){
}
if(mw.config.get('wgNamespaceNumber ') == 777 || mw.config.get('wgNamespaceNumber ') == 100){
wikipCname = $("#wikipCname").html();
if(wikipCname != "" && wikipCname != undefined){
url:wikiSearchurl,
async: false,
cache: false,
success: function(text)
{
response = text;
}
});
$("#wikipDiv").html(response);
$("#wikipDiv").html(response);
}
type: "GET",
url:wikiSearchurl,
async: false, cache: false,
success: function(text)
{
});
$( window ).loadready(function() {
if($("table.infobox.vevent").html()!=null){

Navigation menu

MediaWiki spam blocked by CleanTalk.