Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/custom-t.../admin/assets/js
File: support.js
var support_data = {
[0] Fix | Delete
genericText: ctf_support.genericText,
[1] Fix | Delete
articles: ctf_support.articles,
[2] Fix | Delete
links: ctf_support.links,
[3] Fix | Delete
system_info: ctf_support.system_info,
[4] Fix | Delete
system_info_n: ctf_support.system_info_n,
[5] Fix | Delete
exportFeed: 'none',
[6] Fix | Delete
stickyWidget: false,
[7] Fix | Delete
feeds: ctf_support.feeds,
[8] Fix | Delete
supportUrl: ctf_support.supportUrl,
[9] Fix | Delete
socialWallActivated: ctf_support.socialWallActivated,
[10] Fix | Delete
socialWallLinks: ctf_support.socialWallLinks,
[11] Fix | Delete
siteSearchUrl: ctf_support.siteSearchUrl,
[12] Fix | Delete
siteSearchUrlWithArgs: null,
[13] Fix | Delete
searchKeywords: null,
[14] Fix | Delete
buttons: ctf_support.buttons,
[15] Fix | Delete
links: ctf_support.links,
[16] Fix | Delete
supportPageUrl: ctf_support.supportPageUrl,
[17] Fix | Delete
systemInfoBtnStatus: 'collapsed',
[18] Fix | Delete
copyBtnStatus: null,
[19] Fix | Delete
ajax_handler: ctf_support.ajax_handler,
[20] Fix | Delete
nonce: ctf_support.nonce,
[21] Fix | Delete
icons: ctf_support.icons,
[22] Fix | Delete
images: ctf_support.images,
[23] Fix | Delete
svgIcons : ctf_support.svgIcons,
[24] Fix | Delete
notificationElement : {
[25] Fix | Delete
type : 'success', // success, error, warning, message
[26] Fix | Delete
text : '',
[27] Fix | Delete
shown : null
[28] Fix | Delete
}
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
var ctfsupport = new Vue({
[32] Fix | Delete
el: "#ctf-support",
[33] Fix | Delete
http: {
[34] Fix | Delete
emulateJSON: true,
[35] Fix | Delete
emulateHTTP: true
[36] Fix | Delete
},
[37] Fix | Delete
data: support_data,
[38] Fix | Delete
methods: {
[39] Fix | Delete
copySystemInfo: function() {
[40] Fix | Delete
let self = this;
[41] Fix | Delete
const el = document.createElement('textarea');
[42] Fix | Delete
el.className = 'ctf-fb-cp-clpboard';
[43] Fix | Delete
el.value = self.system_info_n;
[44] Fix | Delete
document.body.appendChild(el);
[45] Fix | Delete
el.select();
[46] Fix | Delete
document.execCommand('copy');
[47] Fix | Delete
document.body.removeChild(el);
[48] Fix | Delete
this.notificationElement = {
[49] Fix | Delete
type : 'success',
[50] Fix | Delete
text : this.genericText.copiedToClipboard,
[51] Fix | Delete
shown : "shown"
[52] Fix | Delete
};
[53] Fix | Delete
[54] Fix | Delete
setTimeout(function() {
[55] Fix | Delete
this.notificationElement.shown = "hidden";
[56] Fix | Delete
}.bind(self), 3000);
[57] Fix | Delete
},
[58] Fix | Delete
expandSystemInfo: function() {
[59] Fix | Delete
this.systemInfoBtnStatus = ( this.systemInfoBtnStatus == 'collapsed' ) ? 'expanded' : 'collapsed';
[60] Fix | Delete
},
[61] Fix | Delete
expandBtnText: function() {
[62] Fix | Delete
if ( this.systemInfoBtnStatus == 'collapsed' ) {
[63] Fix | Delete
return this.buttons.expand;
[64] Fix | Delete
} else if ( this.systemInfoBtnStatus == 'expanded' ) {
[65] Fix | Delete
return this.buttons.collapse;
[66] Fix | Delete
}
[67] Fix | Delete
},
[68] Fix | Delete
exportFeedSettings: function() {
[69] Fix | Delete
// return if no feed is selected
[70] Fix | Delete
if ( this.exportFeed === 'none' ) {
[71] Fix | Delete
return;
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
let url = this.ajax_handler + '?action=ctf_export_settings_json&feed_id=' + this.exportFeed;
[75] Fix | Delete
window.location = url;
[76] Fix | Delete
},
[77] Fix | Delete
searchDoc: function() {
[78] Fix | Delete
let self = this;
[79] Fix | Delete
let searchInput = document.getElementById('ctf-search-doc-input');
[80] Fix | Delete
searchInput.addEventListener('keyup', function ( event ) {
[81] Fix | Delete
let url = new URL( self.siteSearchUrl );
[82] Fix | Delete
let search_params = url.searchParams;
[83] Fix | Delete
if ( self.searchKeywords ) {
[84] Fix | Delete
search_params.set('search', self.searchKeywords);
[85] Fix | Delete
}
[86] Fix | Delete
search_params.set('plugin', 'twitter');
[87] Fix | Delete
url.search = search_params.toString();
[88] Fix | Delete
self.siteSearchUrlWithArgs = url.toString();
[89] Fix | Delete
[90] Fix | Delete
if ( event.key === 'Enter' ) {
[91] Fix | Delete
window.open( self.siteSearchUrlWithArgs, '_blank');
[92] Fix | Delete
}
[93] Fix | Delete
})
[94] Fix | Delete
},
[95] Fix | Delete
searchDocStrings: function() {
[96] Fix | Delete
let self = this;
[97] Fix | Delete
let url = new URL( this.siteSearchUrl );
[98] Fix | Delete
let search_params = url.searchParams;
[99] Fix | Delete
setTimeout(function() {
[100] Fix | Delete
search_params.set('search', self.searchKeywords);
[101] Fix | Delete
search_params.set('plugin', 'twitter');
[102] Fix | Delete
url.search = search_params.toString();
[103] Fix | Delete
self.siteSearchUrlWithArgs = url.toString();
[104] Fix | Delete
}, 10);
[105] Fix | Delete
},
[106] Fix | Delete
goToSearchDocumentation: function() {
[107] Fix | Delete
if ( this.searchKeywords !== null && this.siteSearchUrlWithArgs !== null ) {
[108] Fix | Delete
window.open( this.siteSearchUrlWithArgs, '_blank');
[109] Fix | Delete
}
[110] Fix | Delete
},
[111] Fix | Delete
/**
[112] Fix | Delete
* Toggle Sticky Widget view
[113] Fix | Delete
*
[114] Fix | Delete
* @since 2.0
[115] Fix | Delete
*/
[116] Fix | Delete
toggleStickyWidget: function() {
[117] Fix | Delete
this.stickyWidget = !this.stickyWidget;
[118] Fix | Delete
},
[119] Fix | Delete
},
[120] Fix | Delete
})
[121] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function