SwitchDD

Switch back deals with discussions

As of 2020-06-14. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         SwitchDD
// @namespace    https://greasyfork.org/en/users/2205-ryzhehvost
// @version      0.2
// @description  Switch back deals with discussions
// @author       Ryzhehvost
// @license      Apache-2.0
// @match        https://www.steamgifts.com/giveaways/*
// @match        https://www.steamgifts.com/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let previews = document.querySelectorAll(".homepage_heading");
    let deals = previews[0].parentElement;
    let discussions = previews[1].parentElement;
    let newdeals=deals.cloneNode(true);
    let newdiscussions=discussions.cloneNode(true);
    deals.parentNode.replaceChild(newdiscussions, deals);
    discussions.parentNode.replaceChild(newdeals,discussions);
})();