mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-09-14 19:32:10 +02:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
1b5304efb7 | |||
d59375308f | |||
8c9509a906 | |||
fb86d8f3a8 | |||
50e909cb3d | |||
2f54edf7e7 | |||
c251603e1e | |||
4476edb6c3 | |||
28fc67660f | |||
6e8b5a5ce5 | |||
e53681416f | |||
acb5e184e8 | |||
bdbafb3e5c | |||
ac70cf87c6 | |||
93de835ab4 |
@@ -1,9 +1,18 @@
|
|||||||
using System.Collections.Specialized;
|
// Uncomment to force TweetDeck to load a predefined version of the vendor/bundle scripts and stylesheets
|
||||||
|
// #define FREEZE_TWEETDECK_RESOURCES
|
||||||
|
|
||||||
|
using System.Collections.Specialized;
|
||||||
using CefSharp;
|
using CefSharp;
|
||||||
using CefSharp.Handler;
|
using CefSharp.Handler;
|
||||||
using TweetDuck.Core.Handling.General;
|
using TweetDuck.Core.Handling.General;
|
||||||
using TweetDuck.Core.Utils;
|
using TweetDuck.Core.Utils;
|
||||||
|
|
||||||
|
#if FREEZE_TWEETDECK_RESOURCES
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace TweetDuck.Core.Handling{
|
namespace TweetDuck.Core.Handling{
|
||||||
class RequestHandlerBase : DefaultRequestHandler{
|
class RequestHandlerBase : DefaultRequestHandler{
|
||||||
private readonly bool autoReload;
|
private readonly bool autoReload;
|
||||||
@@ -31,5 +40,36 @@ namespace TweetDuck.Core.Handling{
|
|||||||
browser.Reload();
|
browser.Reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FREEZE_TWEETDECK_RESOURCES
|
||||||
|
private static readonly Regex TweetDeckResourceUrl = new Regex(@"/dist/(.*?)\.(.*?)\.(css|js)$", RegexOptions.Compiled);
|
||||||
|
|
||||||
|
private static readonly SortedList<string, string> TweetDeckHashes = new SortedList<string, string>(2){
|
||||||
|
{ "vendor.js", "d897f6b9ed" },
|
||||||
|
{ "bundle.js", "851d3877b9" },
|
||||||
|
{ "vendor.css", "ce7cdd10b6" },
|
||||||
|
{ "bundle.css", "c339f07047" }
|
||||||
|
};
|
||||||
|
|
||||||
|
public override bool OnResourceResponse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response){
|
||||||
|
if (request.ResourceType == ResourceType.Script || request.ResourceType == ResourceType.Stylesheet){
|
||||||
|
string url = request.Url;
|
||||||
|
Match match = TweetDeckResourceUrl.Match(url);
|
||||||
|
|
||||||
|
if (match.Success && TweetDeckHashes.TryGetValue($"{match.Groups[1]}.{match.Groups[3]}", out string hash)){
|
||||||
|
if (match.Groups[2].Value == hash){
|
||||||
|
Debug.WriteLine($"Accepting {url}");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Debug.WriteLine($"Rewriting {url} hash to {hash}");
|
||||||
|
request.Url = TweetDeckResourceUrl.Replace(url, $"/dist/$1.{hash}.$3");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.OnResourceResponse(browserControl, browser, frame, request, response);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,16 +1,8 @@
|
|||||||
// Uncomment to force TweetDeck to load a predefined version of the vendor/bundle scripts
|
using System.Collections.Specialized;
|
||||||
// #define FREEZE_TWEETDECK_SCRIPTS
|
|
||||||
|
|
||||||
using System.Collections.Specialized;
|
|
||||||
using CefSharp;
|
using CefSharp;
|
||||||
using TweetDuck.Core.Handling.Filters;
|
using TweetDuck.Core.Handling.Filters;
|
||||||
using TweetDuck.Core.Utils;
|
using TweetDuck.Core.Utils;
|
||||||
|
|
||||||
#if FREEZE_TWEETDECK_SCRIPTS
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace TweetDuck.Core.Handling{
|
namespace TweetDuck.Core.Handling{
|
||||||
sealed class RequestHandlerBrowser : RequestHandlerBase{
|
sealed class RequestHandlerBrowser : RequestHandlerBase{
|
||||||
public string BlockNextUserNavUrl { get; set; }
|
public string BlockNextUserNavUrl { get; set; }
|
||||||
@@ -36,36 +28,11 @@ namespace TweetDuck.Core.Handling{
|
|||||||
return base.OnBeforeBrowse(browserControl, browser, frame, request, userGesture, isRedirect);
|
return base.OnBeforeBrowse(browserControl, browser, frame, request, userGesture, isRedirect);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FREEZE_TWEETDECK_SCRIPTS
|
|
||||||
private static readonly Regex TweetDeckScriptUrl = new Regex(@"/dist/(.*?)\.(.*?)\.js$", RegexOptions.Compiled);
|
|
||||||
|
|
||||||
private static readonly SortedList<string, string> TweetDeckHashes = new SortedList<string, string>(2){
|
|
||||||
{ "vendor", "942c0a20e8" },
|
|
||||||
{ "bundle", "1bd75b5854" }
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public override bool OnResourceResponse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response){
|
public override bool OnResourceResponse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response){
|
||||||
if (request.ResourceType == ResourceType.Image && request.Url.Contains("/backgrounds/spinner_blue")){
|
if (request.ResourceType == ResourceType.Image && request.Url.Contains("/backgrounds/spinner_blue")){
|
||||||
request.Url = TwitterUtils.LoadingSpinner.Url;
|
request.Url = TwitterUtils.LoadingSpinner.Url;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if FREEZE_TWEETDECK_SCRIPTS
|
|
||||||
else if (request.ResourceType == ResourceType.Script){
|
|
||||||
Match match = TweetDeckScriptUrl.Match(request.Url);
|
|
||||||
|
|
||||||
if (match.Success && TweetDeckHashes.TryGetValue(match.Groups[1].Value, out string hash)){
|
|
||||||
if (match.Groups[2].Value == hash){
|
|
||||||
System.Diagnostics.Debug.WriteLine($"accepting {request.Url}");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
System.Diagnostics.Debug.WriteLine($"rewriting {request.Url} to {hash}");
|
|
||||||
request.Url = TweetDeckScriptUrl.Replace(request.Url, "/dist/$1."+hash+".js");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return base.OnResourceResponse(browserControl, browser, frame, request, response);
|
return base.OnResourceResponse(browserControl, browser, frame, request, response);
|
||||||
}
|
}
|
||||||
|
@@ -59,7 +59,7 @@ namespace TweetDuck.Core.Notification{
|
|||||||
build.Append("<style type='text/css'>").Append(customCSS).Append("</style>");
|
build.Append("<style type='text/css'>").Append(customCSS).Append("</style>");
|
||||||
}
|
}
|
||||||
|
|
||||||
build.Append("</head><body class='scroll-styled-v system-font-stack");
|
build.Append("</head><body class='scroll-styled-v");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(bodyClasses)){
|
if (!string.IsNullOrEmpty(bodyClasses)){
|
||||||
build.Append(' ').Append(bodyClasses);
|
build.Append(' ').Append(bodyClasses);
|
||||||
|
@@ -20,7 +20,7 @@ namespace TweetDuck{
|
|||||||
public const string BrandName = "TweetDuck";
|
public const string BrandName = "TweetDuck";
|
||||||
public const string Website = "https://tweetduck.chylex.com";
|
public const string Website = "https://tweetduck.chylex.com";
|
||||||
|
|
||||||
public const string VersionTag = "1.16.1";
|
public const string VersionTag = "1.16.3";
|
||||||
|
|
||||||
public static readonly string ProgramPath = AppDomain.CurrentDomain.BaseDirectory;
|
public static readonly string ProgramPath = AppDomain.CurrentDomain.BaseDirectory;
|
||||||
public static readonly bool IsPortable = File.Exists(Path.Combine(ProgramPath, "makeportable"));
|
public static readonly bool IsPortable = File.Exists(Path.Combine(ProgramPath, "makeportable"));
|
||||||
|
@@ -110,6 +110,14 @@ enabled(){
|
|||||||
|
|
||||||
// styles
|
// styles
|
||||||
|
|
||||||
|
if (!document.getElementById("td-clearcolumns-workaround")){
|
||||||
|
// TD started caching mustaches so disabling the plugin doesn't update the column headers properly...
|
||||||
|
let workaround = document.createElement("style");
|
||||||
|
workaround.id = "td-clearcolumns-workaround";
|
||||||
|
workaround.innerText = "#tduck a[data-action='td-clearcolumns-dosingle'] { display: none }";
|
||||||
|
document.head.appendChild(workaround);
|
||||||
|
}
|
||||||
|
|
||||||
this.css = window.TDPF_createCustomStyle(this);
|
this.css = window.TDPF_createCustomStyle(this);
|
||||||
|
|
||||||
this.css.insert(".js-app-add-column.is-hidden + .clear-columns-btn-all-parent { display: none; }");
|
this.css.insert(".js-app-add-column.is-hidden + .clear-columns-btn-all-parent { display: none; }");
|
||||||
@@ -120,8 +128,9 @@ enabled(){
|
|||||||
this.css.insert(".column[data-td-icon='icon-message'] .column-header-links { min-width: 110px !important; }");
|
this.css.insert(".column[data-td-icon='icon-message'] .column-header-links { min-width: 110px !important; }");
|
||||||
this.css.insert(".btn-options-tray[data-action='clear'] { display: none !important; }");
|
this.css.insert(".btn-options-tray[data-action='clear'] { display: none !important; }");
|
||||||
|
|
||||||
this.css.insert(".column[data-td-icon='icon-schedule'] a[data-action='td-clearcolumns-dosingle'] { display: none; }");
|
this.css.insert("#tduck a[data-action='td-clearcolumns-dosingle'] { display: inline-block; }");
|
||||||
this.css.insert(".column[data-td-icon='icon-custom-timeline'] a[data-action='td-clearcolumns-dosingle'] { display: none; }");
|
this.css.insert("#tduck .column[data-td-icon='icon-schedule'] a[data-action='td-clearcolumns-dosingle'] { display: none; }");
|
||||||
|
this.css.insert("#tduck .column[data-td-icon='icon-custom-timeline'] a[data-action='td-clearcolumns-dosingle'] { display: none; }");
|
||||||
}
|
}
|
||||||
|
|
||||||
ready(){
|
ready(){
|
||||||
|
@@ -255,7 +255,7 @@ enabled(){
|
|||||||
|
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
if (theme != TD.settings.getTheme()){
|
if (theme != TD.settings.getTheme()){
|
||||||
$(document).trigger("uiToggleTheme");
|
TD.settings.setTheme(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
me.saveConfig();
|
me.saveConfig();
|
||||||
@@ -432,7 +432,8 @@ enabled(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.config.forceArialFont){
|
if (this.config.forceArialFont){
|
||||||
this.css.insert("#tduck .system-font-stack { font-family: Arial, sans-serif; font-weight: 400 }");
|
this.css.insert("#tduck { font-family: Arial, sans-serif; font-weight: 400 }");
|
||||||
|
this.css.insert("#tduck input, #tduck label, #tduck select, #tduck textarea { font-family: Arial }")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.config.increaseQuoteTextSize){
|
if (this.config.increaseQuoteTextSize){
|
||||||
@@ -541,11 +542,13 @@ ${iconData.map(entry => `#tduck .icon-${entry[0]}:before{content:\"\\f0${entry[1
|
|||||||
|
|
||||||
.drawer .btn .icon, .app-header .btn .icon { line-height: 1em !important }
|
.drawer .btn .icon, .app-header .btn .icon { line-height: 1em !important }
|
||||||
.app-search-fake .icon { margin-top: -3px !important }
|
.app-search-fake .icon { margin-top: -3px !important }
|
||||||
#tduck .js-docked-compose .js-drawer-close { margin: 20px 0 0 !important }
|
|
||||||
#tduck .search-input-control .icon { font-size: 20px !important; top: -4px !important }
|
#tduck .search-input-control .icon { font-size: 20px !important; top: -4px !important }
|
||||||
|
#tduck .js-docked-compose .js-drawer-close { margin: 20px 0 0 !important }
|
||||||
|
#tduck .compose-media-bar-remove .icon-close, #tduck .compose-media-grid-remove .icon-close { padding: 3px 2px 1px !important }
|
||||||
|
|
||||||
.js-column-header .column-type-icon { margin-top: 0 !important }
|
.js-column-header .column-type-icon { margin-top: 0 !important }
|
||||||
.inline-reply .pull-left .Button--link { margin-top: 3px !important }
|
.inline-reply .pull-left .Button--link { margin-top: 3px !important }
|
||||||
|
.js-inline-compose-pop .icon-popout { font-size: 23px !important }
|
||||||
|
|
||||||
.tweet-action-item .icon-favorite-toggle { font-size: 16px !important; }
|
.tweet-action-item .icon-favorite-toggle { font-size: 16px !important; }
|
||||||
.tweet-action-item .heartsprite { top: -260% !important; left: -260% !important; transform: scale(0.4, 0.39) translateY(0.5px) !important; }
|
.tweet-action-item .heartsprite { top: -260% !important; left: -260% !important; transform: scale(0.4, 0.39) translateY(0.5px) !important; }
|
||||||
@@ -601,7 +604,7 @@ html[data-td-font] { font-size: ${this.config.fontSize} !important }
|
|||||||
.avatar { border-radius: ${this.config.avatarRadius}% !important }
|
.avatar { border-radius: ${this.config.avatarRadius}% !important }
|
||||||
|
|
||||||
${this.config.forceArialFont ? `
|
${this.config.forceArialFont ? `
|
||||||
#tduck .system-font-stack { font-family: Arial, sans-serif; font-weight: 400 }
|
#tduck { font-family: Arial, sans-serif; font-weight: 400 }
|
||||||
` : ``}
|
` : ``}
|
||||||
|
|
||||||
${this.config.increaseQuoteTextSize ? `
|
${this.config.increaseQuoteTextSize ? `
|
||||||
|
@@ -173,12 +173,23 @@
|
|||||||
#edit-design-panel {
|
#edit-design-panel {
|
||||||
width: 693px;
|
width: 693px;
|
||||||
height: 380px;
|
height: 380px;
|
||||||
|
background-color: #FFF;
|
||||||
|
box-shadow: 0 0 10px rgba(17, 17, 17, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
#edit-design-panel .mdl-header {
|
||||||
|
color: #8899A6;
|
||||||
}
|
}
|
||||||
|
|
||||||
#edit-design-panel .mdl-inner {
|
#edit-design-panel .mdl-inner {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#edit-design-panel .mdl-content {
|
||||||
|
border: 1px solid #CCD6DD;
|
||||||
|
background: #EAEAEA;
|
||||||
|
}
|
||||||
|
|
||||||
#edit-design-panel-inner-cols {
|
#edit-design-panel-inner-cols {
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
}
|
}
|
||||||
|
@@ -117,7 +117,7 @@ html.dark .account-settings-bt{border-top:1px solid #e1e8ed}
|
|||||||
html.dark .account-settings-bb{border-bottom:1px solid #e1e8ed}
|
html.dark .account-settings-bb{border-bottom:1px solid #e1e8ed}
|
||||||
html.dark .account-stats a{color:#66757f}
|
html.dark .account-stats a{color:#66757f}
|
||||||
html.dark .account-stats a:hover{color:#2b7bb9}
|
html.dark .account-stats a:hover{color:#2b7bb9}
|
||||||
html.dark .column{background-color:#222426}
|
html.dark .column-panel{background-color:#222426}
|
||||||
html.dark .column.is-focused{box-shadow:0 0 0 6px #7aa2c0}
|
html.dark .column.is-focused{box-shadow:0 0 0 6px #7aa2c0}
|
||||||
html.dark .column-background-fill{background-color:#F5F8FA}
|
html.dark .column-background-fill{background-color:#F5F8FA}
|
||||||
html.dark .more-tweets-glow{background-color:#55acee;background:radial-gradient(ellipse farthest-corner at 50% 100%,#55acee 0%,#55acee 25%,rgba(255,255,255,0) 75%)}
|
html.dark .more-tweets-glow{background-color:#55acee;background:radial-gradient(ellipse farthest-corner at 50% 100%,#55acee 0%,#55acee 25%,rgba(255,255,255,0) 75%)}
|
||||||
@@ -135,7 +135,6 @@ html.dark .column-header{background-color:#292F33}
|
|||||||
html.dark .is-inverted-dark .column-header{border-bottom:1px solid #ddd}
|
html.dark .is-inverted-dark .column-header{border-bottom:1px solid #ddd}
|
||||||
html.dark .is-inverted-dark .column-title-edit-box{color:#111;background-color:#fff;border-color:#e1e8ed}
|
html.dark .is-inverted-dark .column-title-edit-box{color:#111;background-color:#fff;border-color:#e1e8ed}
|
||||||
html.dark .column-header{border-bottom:1px solid #222426}
|
html.dark .column-header{border-bottom:1px solid #222426}
|
||||||
html.dark .column-header-temp{border-bottom:1px solid #ddd}
|
|
||||||
html.dark .column-title-edit-box{color:#e1e8ed;background-color:#14171A;border-color:#111}
|
html.dark .column-title-edit-box{color:#e1e8ed;background-color:#14171A;border-color:#111}
|
||||||
html.dark .column-number{color:#66757f}
|
html.dark .column-number{color:#66757f}
|
||||||
html.dark .is-new .column-type-icon{color:#55acee}
|
html.dark .is-new .column-type-icon{color:#55acee}
|
||||||
@@ -428,8 +427,7 @@ html.dark .list-account .username{color:#8899a6}
|
|||||||
html.dark .list-listmember .username{color:#8899a6}
|
html.dark .list-listmember .username{color:#8899a6}
|
||||||
html.dark .list-listmember .bio{color:#657786}
|
html.dark .list-listmember .bio{color:#657786}
|
||||||
html.dark .divider-bar{background-color:#ddd}
|
html.dark .divider-bar{background-color:#ddd}
|
||||||
html.dark select{background-color:#fff}
|
html.dark input,html.dark textarea,html.dark select{color:#111;border:1px solid #e1e8ed;background-color:#fff}
|
||||||
html.dark input,html.dark textarea,html.dark select{color:#111;border:1px solid #e1e8ed}
|
|
||||||
html.dark input:disabled{background-color:#eaeaea;border-color:#e1e8ed}
|
html.dark input:disabled{background-color:#eaeaea;border-color:#e1e8ed}
|
||||||
html.dark select:disabled{background-color:#f5f8fa}
|
html.dark select:disabled{background-color:#f5f8fa}
|
||||||
html.dark input:focus,html.dark select:focus,html.dark textarea:focus,html.dark .focus{border-color:rgba(80,165,230,0.8);box-shadow:inset 0 1px 3px rgba(17,17,17,0.1),0 0 8px rgba(80,165,230,0.6)}
|
html.dark input:focus,html.dark select:focus,html.dark textarea:focus,html.dark .focus{border-color:rgba(80,165,230,0.8);box-shadow:inset 0 1px 3px rgba(17,17,17,0.1),0 0 8px rgba(80,165,230,0.6)}
|
||||||
@@ -804,3 +802,8 @@ html.dark .DrawerModal{color:#14171A}
|
|||||||
html.dark .app-search-fake{border-color:transparent}
|
html.dark .app-search-fake{border-color:transparent}
|
||||||
html.dark .spinner-small,html.dark .spinner-large{filter:grayscale(80%)brightness(93%)}
|
html.dark .spinner-small,html.dark .spinner-large{filter:grayscale(80%)brightness(93%)}
|
||||||
html.dark .tweet>.color-twitter-blue{color:#8bd!important}
|
html.dark .tweet>.color-twitter-blue{color:#8bd!important}
|
||||||
|
html.dark .hw-card-container>div{border-color:#292F33;background:transparent}
|
||||||
|
html.dark .hw-card-container>div>div{border-color:#292F33}
|
||||||
|
html.dark .modal-content,html.dark .lst-group{color:#292F33}
|
||||||
|
html.dark .lst-launcher a span{color:#657786!important}
|
||||||
|
html.dark .social-proof-names a{color:#3b94d9}
|
||||||
|
@@ -171,14 +171,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.template-editor-form input, .template-editor-form textarea {
|
.template-editor-form input, .template-editor-form textarea {
|
||||||
color: #111;
|
color: #111 !important;
|
||||||
background-color: #fff;
|
background-color: #fff !important;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-editor-form input:focus, .template-editor-form textarea:focus {
|
.template-editor-form input:focus, .template-editor-form textarea:focus {
|
||||||
box-shadow: inset 0 1px 3px rgba(17, 17, 17, 0.1), 0 0 8px rgba(80, 165, 230, 0.6);
|
box-shadow: inset 0 1px 3px rgba(17, 17, 17, 0.1), 0 0 8px rgba(80, 165, 230, 0.6) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-editor-form textarea {
|
.template-editor-form textarea {
|
||||||
|
@@ -245,6 +245,7 @@
|
|||||||
if (column.model.getHasNotification()){
|
if (column.model.getHasNotification()){
|
||||||
let sensitive = isSensitive(tweet);
|
let sensitive = isSensitive(tweet);
|
||||||
let previews = $TDX.notificationMediaPreviews && (!sensitive || TD.settings.getDisplaySensitiveMedia());
|
let previews = $TDX.notificationMediaPreviews && (!sensitive || TD.settings.getDisplaySensitiveMedia());
|
||||||
|
// TODO new cards don't have either previews or links
|
||||||
|
|
||||||
let html = $(tweet.render({
|
let html = $(tweet.render({
|
||||||
withFooter: false,
|
withFooter: false,
|
||||||
@@ -413,7 +414,7 @@
|
|||||||
let fontSizeName = TD.settings.getFontSize();
|
let fontSizeName = TD.settings.getFontSize();
|
||||||
let themeName = TD.settings.getTheme();
|
let themeName = TD.settings.getTheme();
|
||||||
|
|
||||||
let columnBackground = getClassStyleProperty("column", "background-color");
|
let columnBackground = getClassStyleProperty("column-panel", "background-color");
|
||||||
|
|
||||||
let tags = [
|
let tags = [
|
||||||
"<html "+Array.prototype.map.call(document.documentElement.attributes, ele => `${ele.name}="${ele.value}"`).join(" ")+"><head>"
|
"<html "+Array.prototype.map.call(document.documentElement.attributes, ele => `${ele.name}="${ele.value}"`).join(" ")+"><head>"
|
||||||
@@ -574,6 +575,31 @@
|
|||||||
data.setData("text/html", `<a href="${url}">${url}</a>`);
|
data.setData("text/html", `<a href="${url}">${url}</a>`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (ensurePropertyExists(TD, "services", "TwitterStatus", "prototype", "_generateHTMLText")){
|
||||||
|
TD.services.TwitterStatus.prototype._generateHTMLText = prependToFunction(TD.services.TwitterStatus.prototype._generateHTMLText, function(){
|
||||||
|
let card = this.card;
|
||||||
|
let entities = this.entities;
|
||||||
|
return if !(card && entities);
|
||||||
|
|
||||||
|
let urls = entities.urls;
|
||||||
|
return if !(urls && urls.length);
|
||||||
|
|
||||||
|
let shortUrl = card.url;
|
||||||
|
let urlObj = entities.urls.find(obj => obj.url === shortUrl && obj.expanded_url);
|
||||||
|
|
||||||
|
if (urlObj){
|
||||||
|
let expandedUrl = urlObj.expanded_url;
|
||||||
|
card.url = expandedUrl;
|
||||||
|
|
||||||
|
let values = card.binding_values;
|
||||||
|
|
||||||
|
if (values && values.card_url){
|
||||||
|
values.card_url.string_value = expandedUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (ensurePropertyExists(TD, "services", "TwitterMedia", "prototype", "fromMediaEntity")){
|
if (ensurePropertyExists(TD, "services", "TwitterMedia", "prototype", "fromMediaEntity")){
|
||||||
const prevFunc = TD.services.TwitterMedia.prototype.fromMediaEntity;
|
const prevFunc = TD.services.TwitterMedia.prototype.fromMediaEntity;
|
||||||
|
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
/***********/
|
||||||
|
/* General */
|
||||||
|
/***********/
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************/
|
/***********************/
|
||||||
/* Redesign scrollbars */
|
/* Redesign scrollbars */
|
||||||
/***********************/
|
/***********************/
|
||||||
@@ -38,19 +46,23 @@
|
|||||||
/* Square-ify stuff */
|
/* Square-ify stuff */
|
||||||
/********************/
|
/********************/
|
||||||
|
|
||||||
button, .btn, .mdl, .mdl-content, .popover, .lst-modal, .tooltip-inner {
|
#tduck .compose-media-bar-remove .icon-close, #tduck .compose-media-grid-remove .icon-close {
|
||||||
|
border-radius: 2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
button, .btn, .mdl, .mdl-content, .modal-content, .popover, .lst-modal, .tooltip-inner {
|
||||||
border-radius: 1px !important;
|
border-radius: 1px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-item, .media-preview, .media-image, .js-media-added .br--4, #tduck .compose-message-recipient img {
|
.media-item, .media-preview, .media-image, .media-badge, .js-media-sensitive-overlay, .js-media-added .br--4, #tduck .compose-message-recipient img {
|
||||||
border-radius: 1px !important;
|
border-radius: 1px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tweet-button, .app-search-fake, .app-search-input, .compose-text-container, .compose-reply-tweet, .compose-message-recipient-input-container, .compose-message-recipient, .compose-media-bar-holder, .media-grid-container, .js-quote-tweet-holder, .detail-view-inline-text {
|
.tweet-button, .app-search-fake, .app-search-input, .compose-text-container, .compose-reply-tweet, .compose-message-recipient-input-container, .compose-message-recipient, .compose-media-bar-holder, .compose-media-bar-thumb, .media-grid-container, .js-add-image-description, .js-quote-tweet-holder, .detail-view-inline-text, .mdl-column-rhs {
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu, .list-item-last, .quoted-tweet, input, textarea, select, .prf-header {
|
.dropdown-menu, .list-item-last, .quoted-tweet, .hw-card-container > div, input, textarea, select, .prf-header {
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -6,6 +6,7 @@ html, body {
|
|||||||
height: auto !important;
|
height: auto !important;
|
||||||
overflow-x: hidden !important;
|
overflow-x: hidden !important;
|
||||||
overflow-y: auto !important;
|
overflow-y: auto !important;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body::before {
|
body::before {
|
||||||
@@ -36,7 +37,7 @@ body::before {
|
|||||||
/* Square-ify stuff */
|
/* Square-ify stuff */
|
||||||
/********************/
|
/********************/
|
||||||
|
|
||||||
.media-item, .media-preview {
|
.media-item, .media-preview, .media-badge {
|
||||||
border-radius: 1px !important;
|
border-radius: 1px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user