So I'm trying to write a userstyle for Stylish on Firefox to set the iframe height on hits to 1200 no matter what. After what seems like hours of trying this and that my style does not do anything. What am I doing wrong? @-moz-document domain("mturk.com"), url-prefix("https://www.mturk"), url-prefix("http://www.mturk") { iframe { height: 1200 !important; } } Is what I've currently landed on, but I've tried numerous other ways. The iframe has a name of ExternalQuestionIFrameand is a child of only a form tag with no id, the body and the html tags. The base height (which is what I typically want changed) is 400.
I can't help with Stylish, but this greasemonkey script should work: Code: // ==UserScript== // @name Fix iframe // @namespace localhost // @include https://www.mturk.com/mturk/* // @version 1 // ==/UserScript== var iframes = document.getElementsByName('ExternalQuestionIFrame'); if (iframes[0] != null) iframes[0].style.height = '1200'; // If no 'ExternalQuestionIFrame' try 'HTMLQuestionIFrame' if (iframes[0] == null) { iframes = document.getElementsByName('HTMLQuestionIFrame'); if (iframes[0] != null) iframes[0].style.height = '1200'; } Remove that 'HTMLQuestionIFrame' part if you only want to change external questions.
when you're logged into mturk, the protocol is actually https, not http... also, you might want to add a unit value to height, i'm assuming you're going for pixels so px