在左右两边分别添加微博、osc的动弹页面的iframe,乱写着玩。

油猴使用

  • 使用油猴创建新脚本并复制代码进去
  • 油猴
  • 支持:chrome,firefox

收藏夹使用

  • 去掉最上面的注释
  • 先压缩代码后在最前面添加javascript:后添加到chrome的收藏夹中
  • 在需要使用的页面点击该收藏夹即可

代码

// ==UserScript==
// @name         osc-sidebar
// @namespace    http://xu81.com/
// @version      0.1
// @description  osc首页侧边栏,显示最新动弹和快速发送动弹的油猴插件
// @author       xu81.com
// @match        https://www.oschina.net/
// @exclude      https://www.oschina.net/tweet
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var iframe = document.createElement('iframe');
    iframe.style.cssText = 'width: 350px;height: 800px;position: absolute;right: 0px;border: none;top: 96px;z-index: 999;';
    iframe.setAttribute('src', 'https://www.oschina.net/tweets');
    document.body.appendChild(iframe);

    var iframe_weibo = document.createElement('iframe');
    iframe_weibo.style.cssText = 'width:350px;height:800px;position:absolute;left:0px;top: 96px; z-index:999;border:none;';
    iframe_weibo.setAttribute('src','https://m.weibo.cn/');
    document.body.appendChild(iframe_weibo);
})();