miterunau_bottom

looking this page

  1. // ==UserScript==
  2. // @name miterunau_bottom
  3. // @namespace miterunau
  4. // @description looking this page
  5. // @include *
  6. // @version 1.1.1
  7. // @grant none
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js
  9. // ==/UserScript==
  10. (function($){
  11. var cBox = $('<div>').attr('id', 'cBox').css({
  12. "height":"10px",
  13. "width" :"10px",
  14. "z-index":1000000000,
  15. "position":"fixed",
  16. "background":"blue",
  17. "top":2,
  18. "left":2
  19. });
  20. $('body').filter(function(index){
  21. return $('iframe').contents().find('body').parent().prop("tagName");
  22. }).append(cBox);
  23. function miterunau(){
  24. f = 'http://twitter.com/home?status=' + encodeURIComponent('みてるなう|' + document.title + ' - ' + location.href);
  25. a = function() {
  26. if (!window.open(f, '_blank', 'width=800,height=600')) location.href = f;
  27. };
  28. if (/Firefox/.test(navigator.userAgent)) {
  29. setTimeout(a, 0);
  30. } else {
  31. a();
  32. }
  33. }
  34. var p = document.getElementById('cBox');
  35. p.addEventListener('click', miterunau, false);
  36. })(jQuery);