Merge pull request #7 from MelvinSnijders/feat/update-twitter-logo-to-x

💄 Changed all Twitter references and logos to X
This commit is contained in:
Melvin Snijders 2023-08-21 23:27:53 +02:00 committed by GitHub
commit 806a93e671
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1237 additions and 704 deletions

1913
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -149,9 +149,9 @@ textarea {
#box2 .function.enabled.raw { background-position: -116px center; }
#box2 .function.enabled.raw:hover { background-position: -116px bottom; }
#box2 .function.twitter { background-position: -153px top; }
#box2 .function.enabled.twitter { background-position: -153px center; }
#box2 .function.enabled.twitter:hover { background-position: -153px bottom; }
#box2 .function.x { background-position: -153px top; }
#box2 .function.enabled.x { background-position: -153px center; }
#box2 .function.enabled.x:hover { background-position: -153px bottom; }
#box2 .button-picture{ border-width: 0; font-size: inherit; }
#messages {

View file

@ -99,9 +99,9 @@ var haste = function(appName, options) {
this.options = options;
this.configureShortcuts();
this.configureButtons();
// If twitter is disabled, hide the button
if (!options.twitter) {
$('#box2 .twitter').hide();
// If post to X is disabled, hide the button
if (!options.postToX) {
$('#box2 .x').hide();
};
this.baseUrl = options.baseUrl || '/';
};
@ -128,7 +128,7 @@ haste.prototype.lightKey = function() {
// Show the full key
haste.prototype.fullKey = function() {
this.configureKey(['new', 'duplicate', 'twitter', 'raw']);
this.configureKey(['new', 'duplicate', 'x', 'raw']);
};
// Set the key up for certain things to be enabled
@ -309,14 +309,14 @@ haste.prototype.configureButtons = function() {
}
},
{
$where: $('#box2 .twitter'),
label: 'Twitter',
$where: $('#box2 .x'),
label: 'Post to X',
shortcut: function(evt) {
return _this.options.twitter && _this.doc.locked && evt.shiftKey && evt.ctrlKey && evt.keyCode == 84;
return _this.options.postToX && _this.doc.locked && evt.shiftKey && evt.ctrlKey && evt.keyCode == 84;
},
shortcutDescription: 'control + shift + t',
action: function() {
window.open('https://twitter.com/share?url=' + encodeURI(window.location.href));
window.open('https://x.com/share?url=' + encodeURI(window.location.href));
}
}
];

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before After
Before After

View file

@ -33,7 +33,7 @@
$(function() {
var baseUrl = window.location.href.split('/');
baseUrl = baseUrl.slice(0, baseUrl.length - 1).join('/') + '/';
app = new haste('hastebin', { twitter: true, baseUrl: baseUrl });
app = new haste('hastebin', { postToX: true, baseUrl: baseUrl });
handlePop({ target: window });
});
</script>
@ -53,7 +53,7 @@
<button class="new function button-picture">New</button>
<button class="duplicate function button-picture">Duplicate & Edit</button>
<button class="raw function button-picture">Just Text</button>
<button class="twitter function button-picture">Twitter</button>
<button class="x function button-picture">Post to X</button>
</div>
<div id="box3" style="display:none;">
<div class="label"></div>