Forked from J05HI/eBay_Kleinanzeigen_Anzeige_duplizieren.js
Last active
November 24, 2023 20:47
-
-
Save M-See/9c86dc57d1650fb2541311b32dd636f9 to your computer and use it in GitHub Desktop.
eBay Kleinanzeigen - Anzeige duplizieren
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Kleinanzeigen Dublicate Ad | |
// @namespace https://qoomon.github.io | |
// @version 1.0.0 | |
// @updateURL https://github.com/qoomon/userscript-kleinanzeigen-duplicate-ad/raw/main/kleinanzeigen-duplicate-ad.user.js | |
// @downloadURL https://github.com/qoomon/userscript-kleinanzeigen-duplicate-ad/raw/main/kleinanzeigen-duplicate-ad.user.js | |
// @description Adds a dublicate ad button to edit ad page | |
// @author qoomon | |
// @match https://www.kleinanzeigen.de/p-anzeige-bearbeiten.html?adId=* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=kleinanzeigen.de | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const duplicateButton = document.createElement('button'); | |
duplicateButton.setAttribute('id', 'pstad-duplicate'); | |
duplicateButton.setAttribute('type', 'submit'); | |
duplicateButton.classList.add('button-secondary'); | |
duplicateButton.style.color = '#0064d2'; | |
duplicateButton.style.borderColor = '#0064d2'; | |
duplicateButton.innerText = 'Anzeige duplizieren'; | |
duplicateButton.addEventListener('click', (event) => { | |
event.preventDefault(); | |
document.getElementById('postad-id').value = ''; | |
document.getElementById('adForm').submit(); | |
}); | |
const submitButton = document.getElementById('pstad-submit'); | |
submitButton.after(duplicateButton); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment