Description

Please bump the The War Child Train for Charity (1+) thread, thanks.

[Tutorial] Installing User Scripts (Tampermonkey)

Introduction

User scripts (also often spelled userscripts) are small pieces of (javascript) code that can be run on any web page to enhance/change their behavior and user experience. Using them is quite easy and they can add a lot to your enjoyment of certain sites.

Installing the Add-on/Extension

To use user scripts you will need an Add-on (as Firefox calls them) or Extension (the term used by Chrome and Opera) to run them. The Add-on/Extension can be installed from the official Add-on page (Firefox) / Webstore (Chrome). To make things easier, this page on Greasy Fork has links to extensions for all browsers out there.

As you can see there are a few different User Script Managers. I would suggest going with Tampermonkey; it is the most used. Greasemonkey has suffered from quite a few issues since it updated to version 4.

Installing is easy; just click the Add to Firefox/Chrome/etc button, you will get a dialog box telling you what the extension can do in your browser (don't be alarmed at the many permissions it needs; that's exactly why these scripts are so useful), see the 1st attached image. Accept and the extension will be installed for you (older browsers might need to restart to enable it).

Once Tampermonkey is installed you will see a new button in your browser's button bar (usually to the right) and a tab will open that warns you about malicious scripts and shows all the features of the extension. While very powerful, user script manages can be abused so make sure to only install scripts from reputable sources. Should you want to play it safe, only use scripts that have lots of installs. If you read the entire features page you will get a good idea of what Tampermonkey can do for you (it can backup your scripts, for instance).

Installing a user script

Installing scripts is exceedingly easy; all you have to do is click a link and then confirm you want to install the script. As this is SteamGifts we'll install RaChart™ Enhancer as an example. Once you go to that page you will see a Download heading and a bold click here to install the script (see the 2nd image).

When you click this link a new tab will open with a Tampermonkey screen where you can click an Install button to actually install the script (see the 3rd image).

Once you clicked the Install button the script is now active (but pages you already had open in your browser will need a reload before you can see the results of the script).

(RaChart™ Enhancer will need some setting up to be useful, see its page for details; I can't stress enough how useful this script is.)

Some background information

On the right of the Install tab it shows you on what web pages a script will be run (see the 3rd image; "Include(s)"). Certain universal scripts will be run on every page you open but scripts meant to enhance a certain website should only run on the site they are meant for.

You can see the active scripts by clicking the Tampermonkey button on the button bar; the menu that appears shows all scripts running on the currently viewed page (see the 4th image). By default Tampermonkey will show the number of active scripts in a red square on the button but this can be disabled.

Also note the green sliding button in the menu that can be used to enable/disable individual scripts. If you go to Dashboard you will see a list of all installed scripts and can use that same sliding button. If there are certain scripts you use only once or twice a year you might want to disable them for the rest of the year; scripts could potentially make your page load slower (but often not noticeably so) or conflict with other installed scripts.

Useful SteamGifts User Scripts

There are quite a few very useful scripts specifically for SteamGifts and fortunately there is a thread that lists a lot of them: SG Add-Ons Registry - List of all scripts for SG.

Another easy way to find more is to search the forum for userscript. As you can see there are loads; just keep in mind that some are no longer supported by their creators and some have been superseded by other scripts (a look at the thread usually tells you what you need to know).

Other useful User Scripts

There are way too many great scripts out there to list, but it's good to know that many scripts can be found on Greasy Fork which we linked to earlier. There are a few other sites that host user scripts as well; Tampermonkey has a page listing them.

While not really the scope of this tutorial I'll list a few of my favorite scripts here, feel free to add your own favorites to the comments.

  • Steam-AutoCraft; I only use this twice a year during the Steam Sales but it's a lifesaver, it automatically creates all Steam badges you have ready to go.
  • YouTube Link Title; this will change a regular link to a YouTube page to a preview of the actual page, showing the name of the video and even allowing you to play it right on whatever page you are.
  • Direct Google Images; now clicking an image on Google Image Search immediately opens just that images.
  • Tumblr Image Size; automatically shows the largest version available of any Tumblr image when viewed directly (so when you open a 500 pixel image it will automatically change it to a 1280 pixel version if it exists.
View attached image.
View attached image.
View attached image.
View attached image.
6 years ago*
Permalink

Comment has been collapsed.

[Userscript] SteamGifts Multiple Giveaways Creator

tl;dr

See the 2nd attached image to see the script in action.

Introduction

This script allows you to create many giveaways in one go. The script was created by Pablo Bianciotto but since he seems to have disappeared I've updated it to keep it in working order and added a few enhancements.

What it does

It adds a section 0 to the New Giveaway page with a textarea where you can paste a list of serial keys and game names (one set per line), see the 1st attached image. This way you will only have to enter the information in sections 4 through 8 once and that information will be used for all giveaways created.

Once you click Load games it will go through all game + key sets supplied, enter them in sections 1 and 2 (you will see it happening) and then open new tabs with the information you supplied. You can then go through these tabs and review the giveaways before confirming them as usual.

Download

The script can be installed from here.

Step by step tutorials

See these threads for more information:

Technical stuff

It seems that in Firefox, new tabs created by a script will always be blocked after the first 20, even if you have whitelisted the site or disabled the blocker. See this article for the details: Pop-up blocker blocks pop-ups even after disabling it

Changelog

Version 0.2
Added a replace function to make the game names regex safe so games with a "(", "+", etc. in their title will be matched correctly.

It replaces all tabs with spaces so you can directly paste from Excel. Also removes all trailing newlines as that used to stop it from working.

Changed name to SteamGifts Multiple Giveaways Creator and added some caps here and there.

View attached image.
View attached image.
6 years ago*
Permalink

Comment has been collapsed.

[Tutorial] Creating multiple giveaways at once (using SteamGifts Multiple Giveaways Creator)

tl;dr

See the 2nd attached image to see the script in action.

Introduction

This tutorial will teach you how you can very quickly create numerous giveaways at once. If you have your game keys in a file and want to create a number of giveaways with the same setting (end date, etc.) then using this script will speed things up immensely.

What you need

To make this work you need a User Script Manager and the SteamGifts Multiple Giveaways Creator script. See these two posts for more details:

Highly recommended

You won't need these scripts but RaChart is just amazing and if you want to create a table/chart of your giveaways then there's a script for that too.

Step by step

After installing the script you will see that the New Giveaway page now has a section 0 at the top (see the 1st attached image). You can paste your list of games and keys in there; keep in mind that each line should contain one game name plus the serial key for that game.

The order can be either key first and game name second (this is the default setting) or the reverse (click the radio button below the textarea for this).

The other radio button allows you to combine multiple keys for the same game into one giveaway with multiple keys.

Once you have done the above you can use the other, regular, sections to set the details for your giveaways like you normally would; Time Range, Region Restricted, etc. All these settings will be used for all the giveaways created.

Once all this is done you simply click the Load games button at the bottom of section 0 and the script will create the giveaways in new tabs for you to review; they won't go live until you actually click the Confirm Giveaway buttons on the tabs like you would when creating just one giveaway.

See the gif (2nd image) to see the script in action.

Things to keep in mind

Tabs
Your browser might keep the script from creating more than a certain number of tabs at a time. Firefox will block the script from creating more after the first twenty tabs (see the script page for details), other browsers will behave differently (possibly depending on their pop-up blocker settings). You can always create your giveaways in batches of twenty games at time.

Correct game name
It's important to know that the game name should be spelled exactly as it is in SteamGifts' database or no match will be found; this is to protect you from creating a giveaway for the wrong game. Note that bundle sites occasionally list a name for a game that is different from the name in the SteamGifts database.

At the end of the Load Games process you will get a dialog box that will either say "All games found" or "Games not found:" and then a listing of the titles the script was unable to match (see 3rd image). What I personally like to do in the latter case is to copy that list of not found games and paste it at the top of the textarea as a reminder. Then I remove all games that were successfully found from the textarea. Make sure at this point to actually confirm the giveaways already created as they can no longer be confirmed after a certain time has passed.

I then enter the game name in the input box at section 1 Select a Game. If it finds the correct game I click it so the name is entered into the input box. From there I copy it to the textarea to replace the incorrect name. I do this for all games as needed and then remove the reminder I pasted earlier before clicking Load Games again.

It's always possible a game name can't be found at all; the game can't be given away in that case.

View attached image.
View attached image.
View attached image.
6 years ago*
Permalink

Comment has been collapsed.

[Userscript] SteamGifts Giveaways Table/Chart Creator

tl;dr

See the 2nd attached image to see the script in action.

Introduction

This script allows you to very easily create a (RaChart compatible) table/chart (pick your favorite term) of all/some giveaways you created for easy pasting in any thread. The table contains a column with the game name and a link to the Steam Store and a column with a link to the giveaway. You can add extra columns as desired.

With one click it creates a number of tables at once; one as described above, one for pasting to Excel, one for Giveaways for peace, one for Positive thread!, and one for You're Not Alone #3. These last three add columns with the supplied level, end date, and the creator name for direct pasting to those threads.

What it does

It adds a few extra options to the sidebar of the View Created page that will allow you to create tables/charts per the settings you select (see the 1st attached image). You can create a table for all giveaways on the page (it supports endless scrolling if you have that via a script) or just those you specifically want to select.

Once you click the Create Giveaway Tables button it create a number of different tables and will display links to popups containing the tables. A button on the popup allows you to copy the table to clipboard, ready for pasting.

Download

The script can be installed from here.

Step by step tutorials

See these threads for more information:

Original Background

I've been a fan of RaChart™ Enhancer ever since Sighery created the script; it's such a quick way to see what games in a list/chart/table you own and which you don't. I saw other applications for it than bundle postings. It seemed to me to be a perfect evolution of the 'train' giveaways; just one table where you can immediately see which games you already own and handy links to bring you to the giveaways of those you don't.

The only problem; creating such a table was a manual and rather laborious affair (though Sighery came through again; with a Python script). So I've been thinking about creating some way to automate the process completely and here's the result of what I've come up with. Most of the credit should go to Sighery, without his help this script wouldn't exist.

Technical stuff

It's pretty simple; the script iterates all created giveaways on the page and grabs the game name, giveaway url, and the game image url. From the game image url we can create a Steam Store url. These three are all that are needed to create the table. It now also grabs the timestamp to be able to include the end date and to skip any ended giveaways if desired.

In the few cases that there is no image, it loads this Steam page with the game name as the search variable. Then it compares any results to the game name and in case of an exact match we take the link from that page and cut off the cruft (everything after the last '/').

There are cases where there are no exact matches on that Steam page; cause of subs, certain DLC, weird capitals, etc. If this is the case then we fall back to loading the Giveaway page straight from Steamgifts and grabbing the Steam link from there. There are a very few cases where that would fail too, as you can create giveaways like this one. If, for whatever reason, no link can be found I put a 'NO LINK FOUND' in the table.

The giveaway level could be gotten from the individual giveaway pages but I don't feel that warrants loading them all and creating a strain on the server. And in the vast majority of the cases all giveaways will be the same level anyway.

Changelog

Version 1.1
Major overhaul.

You can select individual giveaways, skip ended giveaways and it creates tables for Giveaways for peace, Positive thread!, and You're Not Alone #3.

Tables are now loaded in selectable, pretty popups with a copy to clipboard button.

The name has been changed to SteamGifts Giveaways Table/Chart Creator.

View attached image.
View attached image.
6 years ago*
Permalink

Comment has been collapsed.

[Tutorial] Creating a Giveaways Table/Chart

tl;dr

See the 2nd attached image to see the script in action.

Introduction

This tutorial will teach you how you can very quickly create charts/tables of giveaways you created. It uses the comment formatting that is used on the forums here. You can paste these tables in threads you create so people will get to see a nice listing with links to the Steam Store and your giveaways and optionally things like giveaway level, end date, etc. It also creates rows ready to be pasted to 'special threads', see below.

If users have RaChart installed they will even see which games they already own and which are on their wishlist.

What you need

To make this work you need a User Script Manager and the SteamGifts Giveaways Table/Chart Creator script. See these posts for more details:

Highly recommended

You won't need these scripts but RaChart is just amazing and if you want to create your giveaways quickly then there's a script for that too.

Step by step

After installing the script you will see that the View Created page now has a number of new options in the sidebar, below the regular ones (see the 1st attached image). These allow you to customise the tables you can create. When you hover your mouse over any button or field a help text will appear.

The Add Checkboxes button adds a checkbox in front of each giveaway and options to select all or none of them. You can click individual checkboxes to have only those selected added to the tables that will be created. If you don't add any checkboxes then all giveaways on the page will be added to tables.

The Giveaway Title field can be left empty normally, it is explained under More Options below.

You can use the Level field to add the level of the giveaways to an extra column and to the rows for the 'special threads'.

The Extra Columns field can be used to add extra columns, including some special ones, this is explained under More Options below.

Finally, the Don't include ended Giveaways checkbox allows for only those giveaways that are still running to be entered into the tables.

Once you have everything set to your liking, simply press the Create Giveaways Table button. Below the button there will appear a heading called Created Tables and below that will be links to pop-ups with the created tables.

The tables that are created are all different, here's what they do:

  • SG Table: this is the basic table for pasting to your own threads, it already includes heading and alignment rows. Columns from Extra Columns will be added to this table.
  • Excel Table: this uses the exact same settings as the SG Table above but it will have the columns separated by a tab so you can paste it to Excel for further work.
  • Giveaways for peace: creates rows with the exact column order to be pasted to this thread.
  • Positive thread!: creates rows with the exact column order to be pasted to this thread.
  • 💛❤️️ You're Not Alone #3 ❤️️💛: creates rows with the exact column order to be pasted to this thread (🚨🚨 Street Harassment Awareness Thread 🚨🚨 uses the same column order).

The pop-ups have a Copy Table to Clipboard button that will copy everything to your clipboard when clicked. You are then ready to paste the text to your own thread or one of the 'special threads'. Keep in mind that if you paste an entire table to your thread you will need to put it between ``` at the top and bottom (see the comment formatting page).

The 3rd attached image shows a simple table/chart created with this script (and enhanced with RaChart).

More Options

Giveaway Title
This field allows you to specify a name that will be used in the giveaway column for all giveaways. You could, for instance, enter "Click here" into the field and then all links to giveaways would display that text. If you leave this empty then the link to the giveaway will be displayed directly.

Extra Columns
You can add extra columns to the SG and Excel tables using this field. Separate all columns with a pipe symbol ( | ) as usual for formatting tables on here. Make sure to start with a pipe symbol in front of the first extra column; |Column 1|Column 2|etc. Do not put a space between the pipe symbol and the column name if you want to copy to Excel.

The text you enter for the columns will be used for both the table header as for every table row; you will likely want to do a bit more with the text or the usefulness is quite limited. There are three special variables you can use here to put data into these extra columns; they are surrounded by %'s and do the following:

  • %CN%: This variable will be replaced with your user name, the heading for the column will be "User".
  • %ED%: This variable will be replaced with the end date for the giveaway (day month), the heading for the column will be "End Date".
  • %LVL%: This variable will be replaced with whatever you entered into the Level field, the heading used for the column be "Level".
View attached image.
View attached image.
View attached image.
6 years ago*
Permalink

Comment has been collapsed.

I am positive that I am aware that I improved my scripts quite a lot; it was a battle but I am at peace now, I hope I'm not alone. :)

One of the enhancements to my SteamGifts Giveaways Table/Chart Creator script is that it can now create rows ready for pasting to:

Would it be a good idea if all these threads used the same table format to make it easier for people cross posting to all these threads? I know I would post more regularly if that was the case.

And... do you think it would be too much to ask of posters to also include the Steam Store link to make the tables RaChart compatible? :)

View attached image.
6 years ago*
Permalink

Comment has been collapsed.

F

6 years ago
Permalink

Comment has been collapsed.

You do not have permission to comment on giveaways.