It worked out really fine THANX
On 16 dez, 08:46, Aaron Boodman <a...@google.com> wrote: > Try adding "all_frames": true to the content_script block. > > See:http://code.google.com/chrome/extensions/content_scripts.html#registr... > > This was recently added on the dev channel. > > - a > > On Wed, Dec 16, 2009 at 2:10 AM, Guilherme Colodetti > > > > <guilherme...@gmail.com> wrote: > > I´m using 4.0.266. > > Windows 7 > > Manifest > > { > > "name": "Colodas Scrollbar Anywhere", > > "version": "1.9", > > "description": "Scroll bar anywhere you want", > > > "content_scripts": [ > > { > > "matches": ["http://*/*", "https://*/*"], > > "js": ["myscript.js"] > > } > > ], > > "permissions": [ > > "tabs", > > "http://*/*", > > "https://*/*" > > ] > > } > > > The same problem hapens withwww.orkut.com(another google web page). > > My guess is that, at least for now, user scripts are blocked for these > > sites and some other google web pages > > > On 16 dez, 00:25, Aaron Boodman <a...@google.com> wrote: > >> What version of Chrome are you using? What OS? Also, what does your > >> manifest look like? (or are you just installing this as a .user.js > >> file?) > > >> - a > > >> On Tue, Dec 15, 2009 at 5:25 PM, Guilherme Colodetti > > >> <guilherme...@gmail.com> wrote: > >> > Folks, > > >> > I have the following content script: > > >> > // ==UserScript== > >> > // @name Scrollbar Anywhere > >> > // @description Use the scrollbar from anywhere on the page, or > >> > mimic grab-n-drag style scrolling > >> > // @namespace aeosynth > >> > // @include * > >> > // @version 0.1.0 > >> > // @copyright 2009, James Campos > >> > // @license cc-by-3.0;http://creativecommons.org/licenses/by/3.0/ > >> > // ==/UserScript== > > >> > //start preferences > >> > const grabndrag = false > >> > const button = 2//0 = left, 1 = middle, 2 = right > >> > //end preferences > > >> > var X, Y, ratioX, ratioY, initialX, initialY > >> > var flagFirstTime =new Boolean(true); > >> > window.addEventListener('mousedown', function(e) {if (e.button == > >> > button) start(e)}, true) > >> > function start(e) { > > >> > if (flagFirstTime) > >> > { > >> > initialX = window.scrollX > >> > initialY = window.scrollY > >> > } > >> > flagFirstTime = false > > >> > X = e.clientX > >> > Y = e.clientY > >> > if (grabndrag) > >> > ratioX = ratioY = 0.1 > >> > else if (window.scrollMaxY) { > >> > ratioX = (window.innerWidth + window.scrollMaxX) / > >> > window.innerWidth > >> > ratioY = (window.innerHeight + window.scrollMaxY) / > >> > window.innerHeight > >> > } else {//chrome doesn't support window.scrollMax > >> > ratioX = document.width / window.innerWidth > >> > ratioY = document.height / window.innerHeight > >> > } > >> > window.addEventListener('mousemove', move, true) > >> > window.addEventListener('mouseup', end, true) > >> > } > >> > function move(e) > >> > { var diff_X_scroll ,diff_y_scroll > >> > diff_X_scroll = ratioX * (e.clientX - X) > >> > diff_y_scroll = ratioY * (e.clientY - Y) > >> > window.scrollBy(diff_X_scroll , diff_y_scroll ) > >> > X = e.clientX > >> > Y = e.clientY > > >> > } > >> > function end(e) { > >> > window.removeEventListener('mousemove', move, true) > >> > window.removeEventListener('mouseup', end, true) > >> > if ( (Math.abs(window.scrollX-initialX)>1) || (Math.abs > >> > (window.scrollY-initialY)>1)) > >> > document.oncontextmenu = function(){return false;} > >> > else document.oncontextmenu = function(){return true;} > >> > flagFirstTime = true > >> > } > > >> > This code works fine for most of the pages. However, in gmail > >> > standart view it does not work. Does anyone knows why? > >> > Does gmail with labs feature blocks anything? > >> > As far as I know, the code is injected, but not fired. > >> > HELP! > > >> > -- > > >> > You received this message because you are subscribed to the Google > >> > Groups "Chromium-extensions" group. > >> > To post to this group, send email to > >> > chromium-extensi...@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > chromium-extensions+unsubscr...@googlegroups.com. > >> > For more options, visit this group > >> > athttp://groups.google.com/group/chromium-extensions?hl=en. > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Chromium-extensions" group. > > To post to this group, send email to chromium-extensi...@googlegroups.com. > > To unsubscribe from this group, send email to > > chromium-extensions+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/chromium-extensions?hl=en. -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.