Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GreaterGood-CTG-AutoClicker
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gohrbandt, Jan
GreaterGood-CTG-AutoClicker
Commits
b9ef701b
Unverified
Commit
b9ef701b
authored
1 year ago
by
Jan
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Changed var to let
parent
e0118924
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
GreaterGood CTG AutoClicker.js
+12
-12
12 additions, 12 deletions
GreaterGood CTG AutoClicker.js
with
12 additions
and
12 deletions
GreaterGood CTG AutoClicker.js
+
12
−
12
View file @
b9ef701b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
// @description Automatically clicks through all the buttons on all subsites of the GreaterGood ClickToGive program every two hours.
// @description Automatically clicks through all the buttons on all subsites of the GreaterGood ClickToGive program every two hours.
// @description:de Klickt sich automatisch alle zwei Std. durch alle Buttons auf allen Seiten des GreaterGood-ClickToGive-Programms.
// @description:de Klickt sich automatisch alle zwei Std. durch alle Buttons auf allen Seiten des GreaterGood-ClickToGive-Programms.
// @version 2.1.
0
// @version 2.1.
1
// @copyright 2023+, Jan G. (Rsge)
// @copyright 2023+, Jan G. (Rsge)
// @license Mozilla Public License 2.0
// @license Mozilla Public License 2.0
// @icon https://http-aws.greatergood.com/img/ggc/favicon-96x96.png
// @icon https://http-aws.greatergood.com/img/ggc/favicon-96x96.png
...
@@ -35,11 +35,11 @@
...
@@ -35,11 +35,11 @@
// On button site, click button.
// On button site, click button.
var
i
;
let
i
;
var
buttons
=
document
.
getElementsByTagName
(
"
BUTTON
"
);
let
buttons
=
document
.
getElementsByTagName
(
"
BUTTON
"
);
var
buttonFound
=
false
;
let
buttonFound
=
false
;
for
(
i
=
0
;
i
<
buttons
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
buttons
.
length
;
i
++
)
{
var
buttonHTML
=
buttons
[
i
].
innerHTML
;
let
buttonHTML
=
buttons
[
i
].
innerHTML
;
//console.log(buttonHTML);
//console.log(buttonHTML);
if
(
buttonHTML
==
"
Click to Give - it's FREE!
"
)
{
if
(
buttonHTML
==
"
Click to Give - it's FREE!
"
)
{
buttonFound
=
true
;
buttonFound
=
true
;
...
@@ -47,27 +47,27 @@
...
@@ -47,27 +47,27 @@
}
}
}
}
if
(
buttonFound
)
{
if
(
buttonFound
)
{
var
millisecondsToClick
=
(
Math
.
floor
(
Math
.
random
()
*
MAX_RANDOM_TO_CLICK_SECONDS
)
+
1
)
*
1000
;
let
millisecondsToClick
=
(
Math
.
floor
(
Math
.
random
()
*
MAX_RANDOM_TO_CLICK_SECONDS
)
+
1
)
*
1000
;
setTimeout
(
function
(){
buttons
[
i
].
click
()},
millisecondsToClick
);
setTimeout
(
function
(){
buttons
[
i
].
click
()},
millisecondsToClick
);
return
;
return
;
}
}
// On thanks site, choose new site if not all are already clicked.
// On thanks site, choose new site if not all are already clicked.
var
links
=
document
.
getElementsByTagName
(
"
A
"
);
let
links
=
document
.
getElementsByTagName
(
"
A
"
);
for
(
i
=
0
;
i
<
links
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
links
.
length
;
i
++
)
{
var
linkClass
=
links
[
i
].
className
;
let
linkClass
=
links
[
i
].
className
;
//console.log(linkClass);
//console.log(linkClass);
var
linkAttributes
=
links
[
i
].
attributes
[
0
]
let
linkAttributes
=
links
[
i
].
attributes
[
0
]
//console.log(linkAttributes);
//console.log(linkAttributes);
if
(
linkAttributes
===
undefined
)
{
if
(
linkAttributes
===
undefined
)
{
continue
;
continue
;
}
}
var
linkValue
=
linkAttributes
.
value
;
let
linkValue
=
linkAttributes
.
value
;
//console.log(linkValue);
//console.log(linkValue);
if
(
linkClass
.
includes
(
"
-site col-4 button-to-count
"
)
if
(
linkClass
.
includes
(
"
-site col-4 button-to-count
"
)
&&
!
linkClass
.
includes
(
"
click-more-clickAttempted
"
)
&&
!
linkClass
.
includes
(
"
click-more-clickAttempted
"
)
&&
linkValue
.
startsWith
(
"
/clicktogive/
"
))
{
&&
linkValue
.
startsWith
(
"
/clicktogive/
"
))
{
var
link
=
links
[
i
].
href
;
let
link
=
links
[
i
].
href
;
//console.log(link);
//console.log(link);
window
.
open
(
link
,
"
_top
"
);
window
.
open
(
link
,
"
_top
"
);
return
;
return
;
...
@@ -75,6 +75,6 @@
...
@@ -75,6 +75,6 @@
}
}
// Wait for specified time, then reload page to click through again.
// Wait for specified time, then reload page to click through again.
var
intervalMilliseconds
=
(
INTERVAL_MINUTES
+
1
)
*
60
*
1000
;
let
intervalMilliseconds
=
(
INTERVAL_MINUTES
+
1
)
*
60
*
1000
;
setTimeout
(
function
(){
location
.
reload
(
true
);},
intervalMilliseconds
);
setTimeout
(
function
(){
location
.
reload
(
true
);},
intervalMilliseconds
);
})();
})();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment