Created
January 24, 2016 12:26
-
-
Save ahocquet/28a19ace34eae0d8a1ca to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Format AliExpress Order | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Format the order page from AliExpress to make it pretty for printing | |
// @author Anthony HOCQUET | |
// @match http://trade.aliexpress.com/order_detail.htm?orderId=* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ | |
'use strict'; | |
$('#reminder-section').destroy(); | |
$('#message-section').destroy(); | |
$('#shipping-section').destroy(); | |
$('.user-info').destroy(); | |
$('#top-menu').destroy() | |
$('#search-bar').destroy() | |
$('.ui-step').destroy() | |
$('.ui-tab-nav').destroy() | |
$('#welcome-info').destroy() | |
$($('.grid-c').children()[0]).destroy() | |
$('#records-section').append($('#fund-pnl')); | |
$('#fund-pnl').show(); | |
// Remove top border from the navbar tab | |
var elem = document.getElementsByClassName('ui-tab-content')[0] | |
elem.style.borderTop = 0 | |
// Replace the logo by an img element in order to make it printable | |
var img = document.createElement('img'); | |
img.src = 'http://style.aliunicorn.com/wimg/site/group-en/en/buyer/single/logo-new-1x.png' | |
img.style.marginTop = '15px'; | |
img.style.marginLeft = 'auto'; | |
img.style.marginRight = 'auto'; | |
img.style.display = 'block'; | |
$('#logo').destroy() | |
$('#header').append(img) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment