// ==UserScript==
// @name 多吉搜索美化
// @namespace http://nreg.com/
// @version 0.8
// @description try to take over the world!
// @author nreg
// @match http://www.dogedoge.com/*
// @grant none
// @include https://www.dogedoge.com/*
// @require https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js
// @downloadURL https://update.greasyfork.icu/scripts/409005/%E5%A4%9A%E5%90%89%E6%90%9C%E7%B4%A2%E7%BE%8E%E5%8C%96.user.js
// @updateURL https://update.greasyfork.icu/scripts/409005/%E5%A4%9A%E5%90%89%E6%90%9C%E7%B4%A2%E7%BE%8E%E5%8C%96.meta.js
// ==/UserScript==
(function() {
'use strict';
//获取搜索关键字
var keyword=$("#search_form_input").val();
//字体修改 font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
document.body.style.fontFamily = "Helvetica Neue","Microsoft YaHei","Helvetica","Arial","sans-serif !important";
$("input#search_form_input.search__input--adv.js-search-input").css("fontFamily","Helvetica Neue","Microsoft YaHei","Helvetica","Arial","sans-serif !important");
$("a.result__a").css("font-size","18px");
//搜索面板背景色由脏白色改为纯白色
$("div#header_wrapper.header-wrap.b_class").css("background-color","#FFFFFF");
$("div#header_wrapper.header-wrap.b_class").css("height","auto");
//搜索菜单+搜索框距离底部与顶部距离
$("div#header.header.cw").css("padding","20px 0 5px");
$("div#header.header.cw").css("height","auto");
//修正搜索from与logo的间距
$("div.header__search-wrap").css("margin-left","6px");
//搜索菜单距搜索框距离
$("div.zcm").css("margin-top","15px");
//搜索菜单 高度
$("#duckbar").css("height","auto");
//搜索菜单 最大宽度:父-子
$("#duckbar").css("max-width","4096px");
$("div.zcm").css("max-width","4096px");
$("#duckbar_static").css("max-width","4096px");
//搜索框 最大宽度 父-子
$("#header").css("max-width","4096px");
$("div.header__search-wrap").css("max-width","4096px");
//$("div.header__content header__search").css("max-width","4096px");//不包含输入框
//$("#search_form").css("max-width","4096px");//不包含输入框
//$("#search_form_input").css("max-width","4096px");//不包含输入框
$("#duckbar").css("max-width","4096px");
$("div.zcm").css("max-width","4096px");
$("#duckbar_static").css("max-width","4096px");
//限制输入框宽度 父-子
$("div.header__content header__search").css("width","625px");
$("#search_form").css("width","625px");
$("#search_form_input").css("width","625px");
//搜索框 整体居中 父-子
$("#header_wrapper").css("text-align","centor");
$("#header").css("text-align","centor");
$("#header_spaces").css("text-align","centor");
$("div.header__search-wrap").css("text-align","centor");
$("div.header__content header__search").css("text-align","centor");
$("#search_form").css("text-align","centor");
$("#duckbar").css("text-align","centor");
$("div.zcm").css("text-align","centor");
$("#duckbar_static").css("text-align","centor");
//全整体居中 父-子
//$("body").css("text-align","centor");
//$("div.bsite-wrapper js-site-wrapper").css("text-align","centor");
//搜索结果 距离顶部面板距离
$("div#web_content_wrapper.content-wrap").css("padding-top","5px");
//搜索结果的面板最大宽度:父-子
$("#web_content_wrapper").css("max-width","4096px");
$("#div.cw").css("max-width","4096px");
$("#links_wrapper").css("max-width","4096px");
$("#div.results--main").css("max-width","4096px");
$("#div.results--sidebar js-results-sidebar").css("max-width","4096px");
//搜索结果的内容 最大宽度: 父-子
$("div.results--main").css("max-width","645px");
$("#links").css("max-width","645px");
$("div.result results_links_deep highlight_d result--url-above-snippet").css("max-width","645px");
$("div.result__body links_main links_deep").css("max-width","645px");
$("h2.result__title").css("max-width","645px");
$("a.result__a").css("max-width","645px");
$("div.result__extras js-result-extras").css("max-width","645px");
$("div.result__extras__url").css("max-width","645px");
$("div.result__snippet js-result-snippet").css("max-width","645px");//含图片和内容的父级(图片+内容的最大宽度)
$("div.in_result_banner").css("max-width","160px");
//$("div.in_result_banner>img").css("max-width","160px");//图片
$("a.result__url js-result-extras-url").css("max-width","645px");//小url中含图标和链接的父级(图标+链接的最大宽度)
$("span.result__url__domain").css("max-width","630px");//链接
//搜索结果的内容 最大高度: 父-子 给的内容少和图片小 实际不会起效果
$("div.result results_links_deep highlight_d result--url-above-snippet").css("max-height","145px")
$("div.result__body links_main links_deep").css("max-height","145px")
$("div.result__snippet js-result-snippet").css("max-height","100px");//含图片和内容的父级
//搜索结果 整体居中 父-子
$("#web_content_wrapper").css("text-align","centor");
$("#div.cw").css("text-align","centor");
$("#links_wrapper").css("text-align","centor");
$("#div.results--main").css("text-align","centor");
$("#div.results--sidebar js-results-sidebar").css("text-align","centor");
//右下角 百度搜索 改为秘迹搜索
$("a.feedback-btn__send.js-feedback-start").text("秘迹");
$("a.feedback-btn__send.js-feedback-start").attr("href","https://mijisou.com/?q="+keyword);
//上、下一页 改为脚图标
$("#rld-2").css("padding","0px");
$("#rld-2").css("width","60.78px");
$("#rld-2").css("height","39.52px");
$("#rld-2").css("margin-right","42px");
$("div.result.result--more").css("width","30px");
$("div.result.result--more").css("height","33.53px");
$("a.result--more__btn.btn.btn--full").text("");
$("a.result--more__btn.btn.btn--full").css("background-color","#FFFFFF");
$("a.result--more__btn.btn.btn--full").append("");
$("a.result--more__btn.btn.btn--full img").css("width","30px");
$("a.result--more__btn.btn.btn--full").css("width","30px");
$("a.result--more__btn.btn.btn--full").css("height","33.53px");
//丰富多吉未实现的功能
var navigation = function(){
//清空其下所有子元素
$("#duckbar_static").innerHtml="";
$("#duckbar_static").empty();
$("#duckbar").css('width','auto');
$("#duckbar_static").css('width','auto');
$(".zcm__item a").css('width','auto');
$("div.zcm").css('width','auto');
$("li.zcm__item").css('width','auto');
$("a.zcm__link.js-zci-link.js-zci-link--github-hidden").css('width','auto');
$("a.zcm__link.js-zci-link.js-zci-link--web is-active").css('width','auto');
//菜单项:id为duckbar_static与duckbar_new的ul元素为同级,duckbar_new可以另起一行
//网页:将web改为网页
$("#duckbar_static").append("