After having used successfully GM for a long while I observed a new behaviour
in Firefox since a few weeks.
When I drag (under 64bit Win7) a *.user.js script file onto Firefox v29.* the
script content is now displayed as text in Firefox
window and a prompt bar appears at the top:
"This is a Gr
Lets start with an example webpage from a (german) online news magazine.
If you click on the tiny "print" icon a print layout page will be presented.
http://www.focus.de/panorama/welt/wer-knackte-die-boeing-systeme-hier-stimmt-etwas-nicht-emirates-chef-fordert-
aufklaerung-ueber-mh370_id_3904374.h
Assume I have a web page like the following from german newsmagazin:
http://www.focus.de/digital/internet/die-groessten-mems-im-netz-leg-die-brueste-auf-den-tisch-bizarre-internettrends_id_
3437083.html
If you click on the tiny "print" icon near the top right side of the article
users get the pr
Normally a html web page is loaded and then the GM script is applied.
However occasionally certain parts of a web page are loaded AFTER the execution
of the (first) GM script.
In this case this first GM script is NOT re-applied on the new arrived code.
Lets have a look at an example (from a ger
Assume I have a CSS instruction like:
p[style="margin: 4px 0;"] { font-size: 13px !important; line-height: 13px
!important; }
How can I apply it in an GM script in the best (shortest) way? Is
try {
document.querySelector('p[style="margin: 4px 0;"]').setAttribute('style',
'font-size: 13px !impo
Meanwhile I applied successfully lots of GM scripts to many web sites.
However now I am really surprised.
Whenever I applied a GM script to the following webpage(s) nothing happened.
Even after uninstall or delete script + re-install or on other computers
absolute no effect.
Lets take an exampl
I searched inside a GM script for an element of a web page which contains some
text string pattern.
If found I want to output it to WebConsole. Therefore I code the following in
the GM script:
var elem = $("h2:contains('dummy')");
console.log("before output");
if (elem) {
console.log("found el
At the top of some of my scripts I have to insert a line
// @require
http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
This refers to a particular version 1.9.1 of the jQuery library.
As far as I know jQuery libs are downwards compatible.
So I would prefer to always automa
I have here articles from a german newspaper company. Example:
http://www.faz.net/-gsb-7xlbz
resp.
http://www.faz.net/aktuell/feuilleton/medien/zugriff-auf-server-in-irland-microsoft-wehrt-sich-13324607.html
When I click on the "Drucken" link (=which means print) on the upper right side
of the w
When I try to apply the following script statement:
// ==UserScript==
// @nameChangeLayoutHowtogeek
// @namespace nsChangeLayoutHowtogeek
// @description Change Layout HowToGeek
// @include http://*.howtogeek.com/*
// @version 1.2.0
// @grant GM_add
Assume I have a HTML code like:
...
...
Now I want to hide this from within a GM script with a command like
GM_addStyle("div.aaa bbb ccc { display: none !important; }");
but it does not work this way.
How can I refer otherwise to a class with multiple blank separated names?
Ben
--
Ok I can find all images from a webpage with a width of exactly 650px by a GM
script command like:
var imgNodes = document.querySelectorAll('img[width="650"]');
1.) But is there a way to find all images from a webpage with a size of 650px
AND MORE?
2.) Is there a way to find all images from a
As you know there is an option in Firefox under menu
File-->Page Setup-->Format & Options-->Print Background (colors & images)
Is it possible to setup (toggle on/off) this option from GM script?
Ben
--
You received this message because you are subscribed to the Google Groups
"greasemonkey
>From a GM script I want to setup/change the current browser preferences for
>whether the background images and colors should
be printed as well or not.
The current settings for e.g. the Firefox browser can be viewed and changed
through GUI menu
File-->Page setup
The preferences can be change
As I found out much to my surprise TWO (!) versions of a GM script can exist at
the same time.
I had a look in menu
Tools--->AddOns--->UserScripts
and found
v1.60
and
v2.2.0
See attached snapshot.
How can this be? I expected that installing a new script automatically
overwrites the old ver
I want to come back to a GM script code I have asked here a couple of days
before.
I simplified the task and want to replace the ...element by
just the string "aaa" from the URL line this page:
http://www.printfriendly.com/print?url=http%3A%2F%2Fdeutsche-wirtschafts-nachrichten.de%2F2014%2F12%2
Since yesterday I observe a strange installation behaviour of GM.
When I drag a mysscript.user.js from WinExplorer onto Firefox v36.0.1 then TWO
(!)
"Install script?" confirmation dialog popup windows appear.
Is this a bug?
This occurs for all scripts. Even for those which work correctly in th
I can test Javascript commands not only in GM scripts but in Firebug console as
well.
Users just have to copy the commands and click on "run". Thats fine.
Is there a similar way for testing CSS statements in FireBug console as well
(before putting them into a GM script)?
When I copy e.g.
GM_ad
Assume I have on webpages of a domain many elements which contain all an
ID of the pattern "aaa_bbb_ccc_
0004325".
Examples:
...
I want to hide them all by a GM script statement like:
GM_addStyle("#aaa_bbb_ccc_0004325 { display: none !important; }");
Obviously I c
Assume I have the following (simplified) HTML code:
foobar
Now I want to add some additional text in a new line after the inner content of
"source" element.
Therefore I coded in a GM script:
var pane = document.getElementsByClassName("p.source")[0];
pane.innerHTML = pane.innerHTML + " added
An often occuring problem is how to remove stuff after a certain element up to
the end of the enclosing element.
Example:
...
...
...
...
this stuff should be removed resp. hidden
This text should be kept
How can I achieve this from GM script?
Thank you
Ben
--
You received this messa
Lets go at first to a sample page with the grey printer icon in the middle
column:
http://www.finanzen100.de/finanznachrichten/wirtschaft/als-praesident-roosevelt-den-gold-besitz-verbot_H1951016042_65256/
Assume I want to change the font size and line-height and margins for the print
layout pag
Assume I have html pages with the following schema:
...
...
...
...
...
...
...
I want to set for ALL elements inside a new font-family, a
new font-size and a new line-height.
Normally
Assume I want to code the following statement in a GM script:
$("div:contains('Frühstück')").css("display", "none");
I am not sure if your email client displays the search pattern above correctly.
It contains TWO german Umlaute ü = ü
If I drag this *.user.js script onto Firefox then Firefox res
I want to hide an element witht the following code:
...
The following does NOT work:
GM_addStyle(".aaa .bbb .ccc { display: none !important; }");
How else can I refer to that div?
Ben
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group
Assume I have the following HTML code:
...
...foobar..aabbcc..
...
...
blah blahother text
...
...
Now I want to remove/hide only all these (innermost) elements which
contains only elements + additional white
spaces bu
It happened somewhere a couple of month ago.
I cannot figure out if it happened with a new release of Firefox or GM.
When I dragged a new/modified *.user.js script onto Firefox suddenly TWO (!)
installation confirmation popups appeared.
Some people promised a fix for this issue.
Now since a fe
Assume a webpage has a CSS difition like
.mytag { ...
white-space: nowrap; }
If I delete the line with "white-space" in Firebug then the layout/printout
looks good.
So I searched for a way to programmatically remove the white-space entry.
The following does NOT work:
GM_addSt
Assume I have a webpage with the following HTML code:
How can I overwrite the "margin-top" inline style value by e.g. 10 ?
Aftwerwards the following statement should become effective:
If necessary jQuery can be used.
Thank you
Ben
--
You received this message because you are sub
Assume I have the following HTML code of the original web page:
.
How do I switch the value from "true" to "false"?
Ben
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving em
Assume I have an original web page with the following simplified structure:
foobar:
blahblah
...1324.
.dummy..
..
this text should be kept
Now I want to hide (or delete) all 4 brother elements (not only their content)
which follow immediately af
Assume I want to get the content of the following (inner) element and put it at
another position:
..
then the following code (in an GM script) does not work:
var pane = document.getElementsByClass("aaa bbb ccc")[0];
var target = document.getElementsByClass("foobar")[0];
target = pane.in
Assume I original web page has an element like
..
Now I want to replace (resp. more exactly add a class to this element.
It should look like afterwards as follows:
..
How do I do this with GM?
The class sequence "aaa bbb ccc" is NOT unique but the ID.
And the class adding should o
Assume I have an original HTML code like:
...
This should be changed by GM to:
...
How can I achieve this?
Ben
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it,
Assume I want to execute the following statement with a delay of 5 seconds (to
allow loading the web page at first completely):
GM_addStyle("#aaa { display: none !important; }");
then the following GM code does NOT work:
window.setTimeout(function() { GM_addStyle("#aaa { display: none !importan
At first the the sample page (of german ebay):
http://www.ebay.de/itm/5-L-LITER-CASTROL-EDGE-FST-5W-30-MOTOR-OL-MOTOREN-OL-VW-AUDI-SEAT-504-00-507-
00-/371288685142?hash=item567287ba56:g:BT0AAOSw8-tWULh1
I want ot get rid of the ad-strip in the mid with the label "Käufer haben sich
auch folgende
I want to add a script which contains the following jQuery instruction:
$("div:contains('© 1997 20')").eq(($("div:contains('© 1997 20')").length) -
1).css("display", "none");
When I drag the script (lets call it myscript.user.js) onto Firefox v46 under
Win 7
then it is not installed but the con
I setup a GM script with the following (simplyfied) meta tag:
// @include http://*.foobar.com/*
I thought that the trailing wildcard * should tell GM to apply script ONLY if
there is something (at least ONE char)
following the domain name but this is not the case.
How can I setup the @
Assuem I have a CSS for a web page like
.content > img { width: 100% !important; }
Now I want to delete this statement from a Greasemonkey script.
How do I do this?
The following commands do NOT work:
GM_addStyle(".content > img { !important; }");
or
GM_addStyle(".content > img { width !
Currently I use GM script only in Firefox for Windows.
However I am considering to copy them to my Android Tablet as well.
Do GM scripts in Firefox for Android work as well?
What is the UserAgent indentification string for Firefox under Android?
Ben
--
You received this message because you
I am using sometimes a GM script header statement like
// @require http://code.jquery.com/jquery-latest.js
in my GM scripts. It works in general.
Now it occurs occasionally that the jquery.com server seems not available and a
download error popup appears when the GM script is executed.
I have to setup two GM scripts which are reponsible for two kind of webpages
from one domain depending on the number of subfolders after the domain part.
GM script 1 should be applied to all URLs which contain exactly TWO subfolder.
Examples (mind the trailing slashes):
http://www.foobar.com/aa
Assume I have a directory
D:\mytools\foobar\hardfolder\
and a NTFS Hard Link to exactly this folder in another directory
D:\otherdir\work\hardfolder\
So both point to the same physical directory on the source partition.
Now I start a copy or clone operation with XXCOPY.
How does XXCOPY treat t
Today I updated Firefox to new 64bit v57 and to Greasemonkey AddOn v4.0
As far as I can see all my old scripts do not work any more.
Unfortunately I cannot figure out if the update to GM 4.0 or the update to
Firefox v57 causes the trouble.
Do others have the same problems?
Or do I have to adju
In the past I dragged edited *.user.js script fils from Windows Explorer (on
Win 7) onto the Firefox window.
I had to confirm "installation" and it worked.
Since update to Firefox v57 and GM v4.0 this is not possible any more.
After dragging such a file Firefox shows me the source code of the *.
Is it possible to put a "*" wildcard somewhere in the middle of the URL of an
@include statement?
For example is the following meta tag statement valid:
// @include https://www.foobar.com/aaa/*blah/othersubdir/*
Ben
--
You received this message because you are subscribed to the Googl
46 matches
Mail list logo