Window floating container

Adds a fixed header element for use by other scripts

ของเมื่อวันที่ 24-03-2016 ดู เวอร์ชันล่าสุด

สคริปต์นี้ไม่ควรถูกติดตั้งโดยตรง มันเป็นคลังสำหรับสคริปต์อื่น ๆ เพื่อบรรจุด้วยคำสั่งเมทา // @require https://update.greasyfork.org/scripts/18233/115267/Window%20floating%20container.js

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Window floating container 
// @version      0.1
// @description  Adds a fixed header element for use by other scripts
// @author       @_jnblog
// @require      https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js
// @grant        GM_addStyle
// ==/UserScript==
/* jshint -W097 */
/* global $ */
/* jshint asi: true, multistr: true */
'use strict'

var ijgFloater = $('#ijgWindowFloater')
if (!ijgFloater.length) {
  GM_addStyle('#ijgWindowFloater {\
    position: fixed;\
    top: 0;\
    left: 0;\
    z-index: 2000;\
    color: white;\
    background-color: #EB6841;\
  }')
  
  GM_addStyle('#ijgWindowFloater a {\
    color: white !important;\
    padding: 2px;\
    display: inline-block;\
  }')
  GM_addStyle('.ijgWindowFloater-item + .ijgWindowFloater-item {\
    padding-left: 1em;\
  }')
  
  ijgFloater = $('<div id="ijgWindowFloater">')
  $('body').prepend(ijgFloater)
}

function getFloater() {
  return ijgFloater
}