Window floating container

Adds a fixed header element for use by other scripts

Mint 2016.11.28.. Lásd a legutóbbi verzió

Ezt a szkriptet nem ajánlott közvetlenül telepíteni. Ez egy könyvtár más szkriptek számára, amik tartalmazzák a // @require https://update.greasyfork.org/scripts/18233/160309/Window%20floating%20container.js hivatkozást.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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      1.0.0
// @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;\
  }\
  #ijgWindowFloater a {\
    color: white !important;\
    padding: 5px;\
    display: inline-block;\
  }\
  #ijgWindowFloater a:hover {\
    color: #FAF667 !important;\
  }\
  .ijgWindowFloater-item + .ijgWindowFloater-item {\
    padding-left: 1em;\
  }\
  .ijgWindowFloater-toggle {\
    padding: 0;\
    top: -1px;\
    left: -22px;\
    box-shadow: inset 0 0 0 32px;\
    -webkit-transform-origin: right;\
    -ms-transform-origin: right;\
    transform-origin: right;\
    transform: rotate(180deg);\
    display: inline-block;\
    vertical-align: middle;\
    position: relative;\
    font-style: normal;\
    color: transparent;\
    text-align: left;\
    text-indent: -9999px;\
    direction: ltr;\
    box-sizing: border-box;\
    border: 2px solid white;\
    transition: all .2s;\
    border-radius: 50%;\
    width: 24px;\
    height: 24px;\
    margin: 2px;\
    background-color: transparent;\
  }\
  .ijgWindowFloater-toggle:before {\
    content: "";\
    width: 14px;\
    height: 2px;\
    position: absolute;\
    bottom: 0;\
    margin: auto 0;\
    right: 2px;\
    box-shadow: inset 0 0 0 32px;\
    -webkit-transform-origin: right;\
    -ms-transform-origin: right;\
    transform-origin: right;\
    top: 2px;\
    -webkit-transform: rotate(45deg);\
    -ms-transform: rotate(45deg);\
    transform: rotate(45deg);\
    width: 11px;\
    right: 8px;\
    color: white;\
  }\
  .ijgWindowFloater-toggle:after {\
    height: 2px;\
    position: absolute;\
    bottom: 0;\
    margin: auto 0;\
    box-shadow: inset 0 0 0 32px;\
    -webkit-transform-origin: right;\
    -ms-transform-origin: right;\
    transform-origin: right;\
    content: "";\
    top: 0;\
    -webkit-transform: rotate(-45deg);\
    -ms-transform: rotate(-45deg);\
    transform: rotate(-45deg);\
    pointer-events: none;\
    width: 11px;\
    right: 8px;\
    color: white;\
  }')
  
  ijgFloater = $('<div id="ijgWindowFloater"><i class="ijgWindowFloater-toggle"></i></div>')
  $('body').prepend(ijgFloater)
}

function getFloater() {
  return ijgFloater
}