Guest User

sosach-webmnotmute.user.js

a guest
Oct 23rd, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        sosach_WebmNotMute
  3. // @namespace   sosach-webmnotmute
  4. // @include     https://2ch.hk/*
  5. // @version     4
  6. // @grant       none
  7. // ==/UserScript==
  8.  
  9. var original_expand;
  10.  
  11. function new_expand(num, src, thumb_src, n_w, n_h, o_w, o_h, minimize) {
  12.  
  13.     original_expand(num, src, thumb_src, n_w, n_h, o_w, o_h, minimize);
  14.  
  15.     if (!minimize) {
  16.         //var el = unsafeWindow.$id('exlink-' + num).children;
  17.         var el = document.querySelectorAll('video[name=media]');
  18.  
  19.         for (i in el) {
  20.             if (el[i].tagName == "VIDEO") {
  21.                 el[i].muted = 0;
  22.                 //el[i].loop = false;
  23.             }
  24.         }
  25.     }
  26.  
  27.     return false;
  28. }
  29.  
  30. (function() {
  31.     original_expand = unsafeWindow.expand;
  32.     unsafeWindow.expand = new_expand;
  33.     unsafeWindow.config.autoUpdate.minInterval = 120
  34. })();
Advertisement
Add Comment
Please, Sign In to add comment