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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/embedpre.../assets/js
File: preview.js
self.setInterval = function (callback, time, timeout) {
[1500] Fix | Delete
var elapsed = 0;
[1501] Fix | Delete
var iteraction = 0;
[1502] Fix | Delete
[1503] Fix | Delete
var interval = window.setInterval(function () {
[1504] Fix | Delete
elapsed += time;
[1505] Fix | Delete
iteraction++;
[1506] Fix | Delete
[1507] Fix | Delete
if (elapsed <= timeout) {
[1508] Fix | Delete
callback(iteraction, elapsed);
[1509] Fix | Delete
} else {
[1510] Fix | Delete
self.stopInterval(interval);
[1511] Fix | Delete
}
[1512] Fix | Delete
}, time);
[1513] Fix | Delete
[1514] Fix | Delete
return interval;
[1515] Fix | Delete
};
[1516] Fix | Delete
[1517] Fix | Delete
self.stopInterval = function (interval) {
[1518] Fix | Delete
window.clearInterval(interval);
[1519] Fix | Delete
interval = null;
[1520] Fix | Delete
};
[1521] Fix | Delete
[1522] Fix | Delete
/**
[1523] Fix | Delete
* Configure unconfigured embed wrappers, adding events and css
[1524] Fix | Delete
* @return void
[1525] Fix | Delete
*/
[1526] Fix | Delete
self.configureWrappers = function (editorInstance) {
[1527] Fix | Delete
window.setTimeout(
[1528] Fix | Delete
function configureWrappersTimeOut () {
[1529] Fix | Delete
var doc = editorInstance.getDoc(),
[1530] Fix | Delete
$wrapper = null;
[1531] Fix | Delete
[1532] Fix | Delete
// Get all the wrappers
[1533] Fix | Delete
var wrappers = doc.getElementsByClassName('embedpress_wrapper');
[1534] Fix | Delete
if (wrappers.length > 0) {
[1535] Fix | Delete
for (var i = 0; i < wrappers.length; i++) {
[1536] Fix | Delete
$wrapper = $(wrappers[i]);
[1537] Fix | Delete
[1538] Fix | Delete
// Check if the wrapper wasn't already configured
[1539] Fix | Delete
if ($wrapper.data('configured') != true) {
[1540] Fix | Delete
// A timeout was set to avoid block the content loading
[1541] Fix | Delete
window.setTimeout(function () {
[1542] Fix | Delete
// @todo: Check if we need a limit of levels to avoid use too much resources
[1543] Fix | Delete
self.recursivelyAddClass($wrapper, 'embedpress_ignore_mouseout');
[1544] Fix | Delete
}, 500);
[1545] Fix | Delete
[1546] Fix | Delete
// Fix the wrapper size. Wait until find the child iframe. L
[1547] Fix | Delete
var interval = self.setInterval(function (iteraction) {
[1548] Fix | Delete
var $childIframes = $wrapper.find('iframe');
[1549] Fix | Delete
[1550] Fix | Delete
if ($childIframes.length > 0) {
[1551] Fix | Delete
$.each($childIframes, function (index, iframe) {
[1552] Fix | Delete
// Facebook has more than one iframe, we need to ignore the Cross Domain Iframes
[1553] Fix | Delete
if ($(iframe).attr('id') !== 'fb_xdm_frame_https'
[1554] Fix | Delete
&& $(iframe).attr('id') !== 'fb_xdm_frame_http'
[1555] Fix | Delete
) {
[1556] Fix | Delete
$wrapper.css('width', $(iframe).width() + 'px');
[1557] Fix | Delete
self.stopInterval(interval);
[1558] Fix | Delete
}
[1559] Fix | Delete
});
[1560] Fix | Delete
}
[1561] Fix | Delete
}, 500, 8000);
[1562] Fix | Delete
[1563] Fix | Delete
$wrapper.data('configured', true);
[1564] Fix | Delete
}
[1565] Fix | Delete
}
[1566] Fix | Delete
}
[1567] Fix | Delete
},
[1568] Fix | Delete
200
[1569] Fix | Delete
);
[1570] Fix | Delete
};
[1571] Fix | Delete
[1572] Fix | Delete
/**
[1573] Fix | Delete
* Hide the controller panel
[1574] Fix | Delete
*
[1575] Fix | Delete
* @return void
[1576] Fix | Delete
*/
[1577] Fix | Delete
self.hidePreviewControllerPanel = function () {
[1578] Fix | Delete
if (self.controllerPanelIsActive()) {
[1579] Fix | Delete
$(self.activeControllerPanel).addClass('hidden');
[1580] Fix | Delete
self.activeControllerPanel = null;
[1581] Fix | Delete
self.activeWrapper = null;
[1582] Fix | Delete
}
[1583] Fix | Delete
};
[1584] Fix | Delete
[1585] Fix | Delete
/**
[1586] Fix | Delete
* Get an element by id in the editor's content
[1587] Fix | Delete
*
[1588] Fix | Delete
* @param String id The element id
[1589] Fix | Delete
* @return Element The found element or null, wrapped by jQuery
[1590] Fix | Delete
*/
[1591] Fix | Delete
self.getElementInContentById = function (id, editorInstance) {
[1592] Fix | Delete
var doc = editorInstance.getDoc();
[1593] Fix | Delete
[1594] Fix | Delete
if (doc === null) {
[1595] Fix | Delete
return;
[1596] Fix | Delete
}
[1597] Fix | Delete
[1598] Fix | Delete
return $(doc.getElementById(id));
[1599] Fix | Delete
};
[1600] Fix | Delete
[1601] Fix | Delete
/**
[1602] Fix | Delete
* Show the controller panel
[1603] Fix | Delete
*
[1604] Fix | Delete
* @param element $wrapper The wrapper which will be activate
[1605] Fix | Delete
* @return void
[1606] Fix | Delete
*/
[1607] Fix | Delete
self.displayPreviewControllerPanel = function ($wrapper, editorInstance) {
[1608] Fix | Delete
if (self.controllerPanelIsActive() && $wrapper !== self.activeWrapper) {
[1609] Fix | Delete
self.hidePreviewControllerPanel();
[1610] Fix | Delete
}
[1611] Fix | Delete
[1612] Fix | Delete
if (!self.controllerPanelIsActive() && !$wrapper.hasClass('is-loading')) {
[1613] Fix | Delete
var uid = $wrapper.data('uid');
[1614] Fix | Delete
var $panel = self.getElementInContentById('embedpress_controller_panel_' + uid, editorInstance);
[1615] Fix | Delete
[1616] Fix | Delete
if (!$panel.data('event-set')) {
[1617] Fix | Delete
var $editButton = self.getElementInContentById('embedpress_button_edit_' + uid, editorInstance);
[1618] Fix | Delete
var $removeButton = self.getElementInContentById('embedpress_button_remove_' + uid, editorInstance);
[1619] Fix | Delete
[1620] Fix | Delete
self.addEvent('mousedown', $editButton, function (e) {
[1621] Fix | Delete
self.onClickEditButton(e, editorInstance);
[1622] Fix | Delete
});
[1623] Fix | Delete
[1624] Fix | Delete
self.addEvent('mousedown', $removeButton, function (e) {
[1625] Fix | Delete
self.onClickRemoveButton(e, editorInstance);
[1626] Fix | Delete
});
[1627] Fix | Delete
[1628] Fix | Delete
$panel.data('event-set', true);
[1629] Fix | Delete
}
[1630] Fix | Delete
[1631] Fix | Delete
// Update the position of the control bar
[1632] Fix | Delete
var next = $panel.next()[0];
[1633] Fix | Delete
if (typeof next !== 'undefined') {
[1634] Fix | Delete
if (next.nodeName.toLowerCase() === 'iframe') {
[1635] Fix | Delete
$panel.css('left', ($(next).width() / 2));
[1636] Fix | Delete
}
[1637] Fix | Delete
}
[1638] Fix | Delete
[1639] Fix | Delete
// Show the bar
[1640] Fix | Delete
$panel.removeClass('hidden');
[1641] Fix | Delete
[1642] Fix | Delete
self.activeControllerPanel = $panel;
[1643] Fix | Delete
self.activeWrapper = $wrapper;
[1644] Fix | Delete
}
[1645] Fix | Delete
};
[1646] Fix | Delete
};
[1647] Fix | Delete
[1648] Fix | Delete
if (!window.EmbedPress) {
[1649] Fix | Delete
window.EmbedPress = new EmbedPress();
[1650] Fix | Delete
}
[1651] Fix | Delete
[1652] Fix | Delete
// Initialize EmbedPress for all the current editors.
[1653] Fix | Delete
window.EmbedPress.init($data.previewSettings);
[1654] Fix | Delete
});
[1655] Fix | Delete
})(jQuery, String, $data);
[1656] Fix | Delete
[1657] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function