tampermonkey

Chrome: Uncaught TypeError: Cannot read property 'replace' of undefined

房东的猫 提交于 2019-12-25 01:55:19
问题 I am trying to write a code to auto select a radio button: <input type="radio" class="pricezone-radio-input" name="abcdef" value="123" checked="" title="A"> Since the name of the radio button changes every time when the website refresh, so I used the title instead var $ = window.jQuery; (function() { 'use strict'; // Your code here... $("[A']").click(); })(); When I look at the console in chrome, after the code run, an error occur: common.js?version=1552060637712:1175 Uncaught TypeError:

Selecting Checkboxes Based on Value and Parent ID

萝らか妹 提交于 2019-12-24 14:14:53
问题 I'm using Tampermonkey to check checkboxes. The way it's laid out is there's multiple 'Items', each with the same set of checkboxes. I'm trying to have the checkbox pre-selected based on a combination of the checkbox value and the ID (or even title, if that's more ideal). Currently if I use the below, it will select the checkbox but it will do so for Item 1, Item 2, Item 3 and so on when I need to select different options for each. I'm trying to figure out how I go about narrowing the

Disappearing Menu Commands After User Input in Tampermonkey

混江龙づ霸主 提交于 2019-12-24 09:27:53
问题 Tampermonkey is an extension for Google Chrome that attempts to emulate the functionality of Greasemonkey. To be clear, I got my script to work in Chrome and the default JavaScript changes to show up. I wanted to test the menu commands, however, and entered a 6-digit hex color code after clicking on the command in the Tampermonkey menu. I reloaded the page, and the commands disappeared from the menu! My script was still there (and the checkbox was ticked). No matter what I did or what code I

Get value of span text in Tampermonkey

此生再无相见时 提交于 2019-12-24 07:45:02
问题 I am playing with Tampermonkey scripts in JS. I have a website that shows the user's location and timezone in UTC format. <span class="optional-wrapper"> <span class="UTCText"> ==$0 <!-- react-text: 60 --> " (UTC " <!-- /react-text --> <!-- react-text: 61 --> "+10:00" <!-- /react-text --> <!-- react-text: 62 --> ") " <!-- /react-text --> </span> </span> I want to read the UTC timezone (UTC +10:00) and convert it into a time. I tried something like this but it doesn't work. Can someone point

How to start number on refresh

╄→尐↘猪︶ㄣ 提交于 2019-12-24 06:49:21
问题 This code is for Tamper-monkey and it works amazon. It just changes the look of how much money you have and it counts up, I wanted to know if it is possible to make it so whatever number it is on when you refresh the counter starts at that number. var oof = document.getElementById("gc-ui-balance-gc-balance-value"); oof.innerHTML = "0"; function animateValue(id){ var obj = document.getElementById(id); var current = parseInt(obj.innerHTML); setInterval(function(){ obj.innerHTML =current++; },0

run a php script( or anything similar) from greasemonkey/tampermonkey

Deadly 提交于 2019-12-24 04:19:26
问题 I need a way to make a php script that will launch on a certain page load that I do not own. What I want to launch when the page is loaded is a modal that has a login screen. For this to be possible I will need for tampermonkey / greasemonkey to run a php script(or something close to it) that will retrieve information from a sql server. EDIT: I would host my own sql server and users would login/register on to it. They would then use this login to hold their information. 回答1: I'm not really

How to make greasemonkey open lots of links, in new tabs, one by one?

青春壹個敷衍的年華 提交于 2019-12-23 17:45:45
问题 There are some links which looks like above > <td><a href="http://Lucifase.com/pages/2000.php?refid=2000" > target="_blank">2000</a><br></td> <td><a > href="http://Lucifase.com/pages/3000.php?refid=3000" > target="_blank">3000</a><br></td> <td><a > href="http://Lucifase.com/pages/4000.php?refid=4000" > target="_blank">4000</a><br></td> <td><a > href="http://Lucifase.com/pages/5000.php?refid=5000" > target="_blank">5000</a><br></td> <td><a > href="http://Lucifase.com/pages/6000.php?refid=6000"

How can my script change a Specific Font (for a specific class)?

☆樱花仙子☆ 提交于 2019-12-23 09:57:16
问题 I'm trying to make my own Tampermonkey script to change a specific font style on a specific site from a cursive style to a sans-serif style. The HTML from the site is: <div class="text">Ask more leading questions</div> This is nested within 2 ids and one other class. The script I'm working on is based off of a few examples I've attempted to follow: // ==UserScript== // @name Change annoying fonts // @namespace http://use.i.E.your.homepage/ // @version 0.1 // @description change annoying

Prevent execution of a specific inline script tag

若如初见. 提交于 2019-12-23 08:45:56
问题 I'm trying to write a script for Tampermonkey that prevents the execution of a specific inline script tag. The body of the page looks something like this <body> <!-- the following script tag should be executed--> <script type="text/javascript"> alert("I'm executed as normal") </script> <!-- the following script tag should NOT be executed--> <script type="text/javascript"> alert("I should not be executed") </script> <!-- the following script tag should be executed--> <script type="text

Way to Create Keyboard Shortcuts for Google Search Results? [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 06:13:36
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I was wondering if anybody knows a way to create keyboard shortcuts for google search results. For instance, I'm looking for a way open up the first google search result with the number 1, on my keyboard, and for each successive entry to be opened with the next number. I've