小说助手

在小说主页支持跳转到db小说网站,贴吧等。支持起点 创世 纵横 逐浪 17k

< Feedback on 小说助手

Review: Good - script works

§
Posted: 2016/09/04
Edited: 2016/09/04

好评,不过我不用SoDu

修改了一下,替换成了BookLink.Me

§
Posted: 2016/09/04
var url = '<a href="javascript:document.all.booklinkSubmit.click();" class="{1}">免费阅读</a><form method="post" action="https://booklink.me/after_search.php" style="display:none;"><input name="name" style="width:120px;" size="12" type="text" value="{0}" /><input name="book" value="BookLink小说搜索" type="submit" id="booklinkSubmit" /><input name="search_type" value="book" checked="" type="radio" />书名<input name="search_type" value="author" type="radio" />作者&nbsp;&nbsp;</form>';
§
Posted: 2016/09/04

修改版2,还是BookLink.Me

var sites = {
  'qidian.com': 1,
  'qdmm.com': 1,
  'book.zongheng.com': 2,
  'www.17k.com': 3,
  'www.zhulang.com': 4,
  'chuangshi.qq.com': 1000,
};
var url = '<a href="https://booklink.me/book-{0}-{1}.html" target="_blank" class="{2}">免费阅读</a>';
function gettext(site, index, style) {
  return url.replace('{0}', site).replace('{1}', location.href.split(/\/|\./) [index]).replace('{2}', style);
}
function addbtn(position, text, prepend) {
  if (prepend)
  {
    position.prepend(text);
  } else {
    position.append(text);
  }
}(function ()
{
  var text;
  var position;
  var b;
  var domain = sites[document.domain];
  switch (domain)
    {
    case 1:
      text = $('<li></li>').append(gettext(domain, 6, ''));
      position = $('#li_DaShang').parents('ul');
      b = true;
      break;
    case 2:
      text = gettext(domain, 6, ' btn_sr');
      position = $('.book_btn');
      break;
    case 4:
      text = gettext(domain, 5, 'btn btn-primary');
      position = $('.cover-btn');
      b = true;
      break;
    case 3:
      text = gettext(domain, 6, ' btn_sr');
      position = $('.Bar dt');
      b = true;
      break;
    case 1000:
      text = $('<td></td>').append(gettext(domain, 7, 'but02'));
      position = $('#addtobookshelf').parents('tr');
      break;
  }
  addbtn(position, text, b);
}) ();

糖果君Author
§
Posted: 2016/09/05

谢谢支持! 你的小说下载脚本也很棒!!
网站已收藏!!但是,这网站如果没有登录的话并没有sodu方便。。。

Post reply

Sign in to post a reply.