Browse Source

Remove bbcode.js and donor_titles.js

biotorrents 3 years ago
parent
commit
303ae78d4b

+ 1
- 1
sections/artist/artist.php View File

467
 // Comments (must be loaded before View::show_header so that subscriptions and quote notifications are handled properly)
467
 // Comments (must be loaded before View::show_header so that subscriptions and quote notifications are handled properly)
468
 list($NumComments, $Page, $Thread, $LastRead) = Comments::load('artist', $ArtistID);
468
 list($NumComments, $Page, $Thread, $LastRead) = Comments::load('artist', $ArtistID);
469
 
469
 
470
-View::show_header($Name, 'browse,requests,bbcode,comments,recommend,subscriptions');
470
+View::show_header($Name, 'browse,requests,comments,recommend,subscriptions');
471
 ?>
471
 ?>
472
 <div>
472
 <div>
473
   <div class="header">
473
   <div class="header">

+ 1
- 1
sections/collages/all_comments.php View File

29
 // Start printing
29
 // Start printing
30
 View::show_header(
30
 View::show_header(
31
     "Comments for collage $Name",
31
     "Comments for collage $Name",
32
-    'comments,bbcode,subscriptions,vendor/easymde.min',
32
+    'comments,subscriptions,vendor/easymde.min',
33
     'vendor/easymde.min'
33
     'vendor/easymde.min'
34
 );
34
 );
35
 ?>
35
 ?>

+ 1
- 1
sections/collages/artist_collage.php View File

86
     $CollagePages[] = $CollagePage;
86
     $CollagePages[] = $CollagePage;
87
 }
87
 }
88
 
88
 
89
-View::show_header($Name, 'browse,collage,bbcode,recommend');
89
+View::show_header($Name, 'browse,collage,recommend');
90
 ?>
90
 ?>
91
 
91
 
92
 <div>
92
 <div>

+ 1
- 1
sections/collages/edit.php View File

21
 
21
 
22
 View::show_header(
22
 View::show_header(
23
     'Edit',
23
     'Edit',
24
-    'bbcode,vendor/easymde.min',
24
+    'vendor/easymde.min',
25
     'vendor/easymde.min'
25
     'vendor/easymde.min'
26
 );
26
 );
27
 
27
 

+ 1
- 1
sections/collages/new.php View File

3
 
3
 
4
 View::show_header(
4
 View::show_header(
5
     'Create a collection',
5
     'Create a collection',
6
-    'bbcode,vendor/easymde.min',
6
+    'vendor/easymde.min',
7
     'vendor/easymde.min'
7
     'vendor/easymde.min'
8
 );
8
 );
9
 
9
 

+ 1
- 1
sections/collages/torrent_collage.php View File

340
 
340
 
341
 View::show_header(
341
 View::show_header(
342
     $Name,
342
     $Name,
343
-    'browse,collage,bbcode,recommend,wall'
343
+    'browse,collage,recommend,wall'
344
 );
344
 );
345
 ?>
345
 ?>
346
 
346
 

+ 1
- 1
sections/comments/comments.php View File

275
 }
275
 }
276
 $Links = implode(' ', $ActionLinks) . (count($TypeLinks) ? '<br />' . implode(' ', $TypeLinks) : '');
276
 $Links = implode(' ', $ActionLinks) . (count($TypeLinks) ? '<br />' . implode(' ', $TypeLinks) : '');
277
 
277
 
278
-View::show_header($Title, 'bbcode,comments');
278
+View::show_header($Title, 'comments');
279
 ?><div>
279
 ?><div>
280
   <div class="header">
280
   <div class="header">
281
     <h2><?=$Header?></h2>
281
     <h2><?=$Header?></h2>

+ 1
- 1
sections/forums/newthread.php View File

28
 $ENV = ENV::go();
28
 $ENV = ENV::go();
29
 View::show_header(
29
 View::show_header(
30
     "Forums $ENV->CRUMB ".$Forum['Name']." $ENV->CRUMB New Topic",
30
     "Forums $ENV->CRUMB ".$Forum['Name']." $ENV->CRUMB New Topic",
31
-    'comments,bbcode,vendor/jquery.validate.min,form_validate,vendor/easymde.min',
31
+    'comments,vendor/jquery.validate.min,form_validate,vendor/easymde.min',
32
     'vendor/easymde.min'
32
     'vendor/easymde.min'
33
 );
33
 );
34
 ?>
34
 ?>

+ 1
- 1
sections/forums/search.php View File

88
 }
88
 }
89
 
89
 
90
 // Let's hope we got some results - start printing out the content
90
 // Let's hope we got some results - start printing out the content
91
-View::show_header('Forums &gt; Search', 'bbcode,forum_search');
91
+View::show_header('Forums &gt; Search', 'forum_search');
92
 ?>
92
 ?>
93
 
93
 
94
 <div class="header">
94
 <div class="header">

+ 1
- 1
sections/forums/thread.php View File

172
 // Start printing
172
 // Start printing
173
 View::show_header(
173
 View::show_header(
174
     $ThreadInfo['Title'].' &rsaquo; '.$Forums[$ForumID]['Name'].' &rsaquo; Forums',
174
     $ThreadInfo['Title'].' &rsaquo; '.$Forums[$ForumID]['Name'].' &rsaquo; Forums',
175
-    'comments,subscriptions,bbcode,vendor/easymde.min',
175
+    'comments,subscriptions,vendor/easymde.min',
176
     ($IsDonorForum ?? 'donor,').'vendor/easymde.min'
176
     ($IsDonorForum ?? 'donor,').'vendor/easymde.min'
177
 );
177
 );
178
 ?>
178
 ?>

+ 1
- 1
sections/inbox/compose.php View File

29
 }
29
 }
30
 View::show_header(
30
 View::show_header(
31
     'Compose',
31
     'Compose',
32
-    'inbox,bbcode,vendor/jquery.validate.min,form_validate,vendor/easymde.min',
32
+    'inbox,vendor/jquery.validate.min,form_validate,vendor/easymde.min',
33
     'vendor/easymde.min'
33
     'vendor/easymde.min'
34
 );
34
 );
35
 ?>
35
 ?>

+ 1
- 1
sections/inbox/conversation.php View File

63
 
63
 
64
 View::show_header(
64
 View::show_header(
65
     "View conversation $Subject",
65
     "View conversation $Subject",
66
-    'comments,inbox,bbcode,vendor/jquery.validate.min,form_validate,vendor/easymde.min',
66
+    'comments,inbox,vendor/jquery.validate.min,form_validate,vendor/easymde.min',
67
     'vendor/easymde.min'
67
     'vendor/easymde.min'
68
 );
68
 );
69
 
69
 

+ 1
- 1
sections/reports/compose.php View File

35
 if (!$ComposeToUsername) {
35
 if (!$ComposeToUsername) {
36
   error(404);
36
   error(404);
37
 }
37
 }
38
-View::show_header('Compose', 'inbox,bbcode');
38
+View::show_header('Compose', 'inbox');
39
 
39
 
40
 // $TypeLink is placed directly in the <textarea> when composing a PM
40
 // $TypeLink is placed directly in the <textarea> when composing a PM
41
 switch ($Type) {
41
 switch ($Type) {

+ 1
- 1
sections/reports/report.php View File

128
 
128
 
129
 View::show_header(
129
 View::show_header(
130
     'Report a '.$Type['title'],
130
     'Report a '.$Type['title'],
131
-    'bbcode,vendor/jquery.validate.min,form_validate'
131
+    'vendor/jquery.validate.min,form_validate'
132
 );
132
 );
133
 ?>
133
 ?>
134
 <div class="thin">
134
 <div class="thin">

+ 1
- 1
sections/reports/reports.php View File

13
 include(SERVER_ROOT . '/sections/reports/array.php');
13
 include(SERVER_ROOT . '/sections/reports/array.php');
14
 
14
 
15
 // Header
15
 // Header
16
-View::show_header('Reports', 'bbcode,reports');
16
+View::show_header('Reports', 'reports');
17
 
17
 
18
 if (isset($_GET['id']) && $_GET['id'] && is_number($_GET['id'])) {
18
 if (isset($_GET['id']) && $_GET['id'] && is_number($_GET['id'])) {
19
   $View = 'Single report';
19
   $View = 'Single report';

+ 1
- 1
sections/reportsv2/report.php View File

67
     */
67
     */
68
 }
68
 }
69
 
69
 
70
-View::show_header('Report', 'reportsv2,browse,torrent,bbcode,recommend');
70
+View::show_header('Report', 'reportsv2,browse,torrent,recommend');
71
 ?>
71
 ?>
72
 
72
 
73
 <div>
73
 <div>

+ 1
- 1
sections/reportsv2/static.php View File

215
 list($Results) = $DB->next_record();
215
 list($Results) = $DB->next_record();
216
 $PageLinks = Format::get_pages($Page, $Results, REPORTS_PER_PAGE, 11);
216
 $PageLinks = Format::get_pages($Page, $Results, REPORTS_PER_PAGE, 11);
217
 
217
 
218
-View::show_header('Reports V2!', 'reportsv2,bbcode');
218
+View::show_header('Reports V2!', 'reportsv2');
219
 ?>
219
 ?>
220
 <div class="header">
220
 <div class="header">
221
   <h2><?=$Title?></h2>
221
   <h2><?=$Title?></h2>

+ 1
- 1
sections/requests/new_edit.php View File

97
 
97
 
98
 View::show_header(
98
 View::show_header(
99
     ($NewRequest ? 'Create Request' : 'Edit Request'),
99
     ($NewRequest ? 'Create Request' : 'Edit Request'),
100
-    'bbcode,requests,upload,form_validate,vendor/easymde.min',
100
+    'requests,upload,form_validate,vendor/easymde.min',
101
     'vendor/easymde.min'
101
     'vendor/easymde.min'
102
 );
102
 );
103
 ?>
103
 ?>

+ 1
- 1
sections/requests/request.php View File

71
 
71
 
72
 View::show_header(
72
 View::show_header(
73
     "View request: $Title",
73
     "View request: $Title",
74
-    'comments,requests,bbcode,subscriptions,vendor/easymde.min',
74
+    'comments,requests,subscriptions,vendor/easymde.min',
75
     'vendor/easymde.min'
75
     'vendor/easymde.min'
76
 );
76
 );
77
 ?>
77
 ?>

+ 1
- 1
sections/staffpm/viewconv.php View File

33
 
33
 
34
     View::show_header(
34
     View::show_header(
35
         'Staff PM',
35
         'Staff PM',
36
-        'staffpm,bbcode,vendor/easymde.min',
36
+        'staffpm,vendor/easymde.min',
37
         'vendor/easymde.min'
37
         'vendor/easymde.min'
38
     );
38
     );
39
 
39
 

+ 1
- 1
sections/tools/managers/mass_pm.php View File

12
 
12
 
13
 View::show_header(
13
 View::show_header(
14
     'Compose Mass PM',
14
     'Compose Mass PM',
15
-    'inbox,bbcode,vendor/jquery.validate.min,form_validate'
15
+    'inbox,vendor/jquery.validate.min,form_validate'
16
 ); ?>
16
 ); ?>
17
 
17
 
18
 <main>
18
 <main>

+ 1
- 1
sections/tools/managers/news.php View File

8
 
8
 
9
 View::show_header(
9
 View::show_header(
10
     'Manage news',
10
     'Manage news',
11
-    'bbcode,vendor/easymde.min',
11
+    'vendor/easymde.min',
12
     'vendor/easymde.min'
12
     'vendor/easymde.min'
13
 );
13
 );
14
 
14
 

+ 1
- 1
sections/torrents/details.php View File

118
 // Start output
118
 // Start output
119
 View::show_header(
119
 View::show_header(
120
     $Title,
120
     $Title,
121
-    'browse,comments,torrent,bbcode,recommend,cover_art,subscriptions,vendor/easymde.min',
121
+    'browse,comments,torrent,recommend,cover_art,subscriptions,vendor/easymde.min',
122
     'vendor/easymde.min'
122
     'vendor/easymde.min'
123
 );
123
 );
124
 ?>
124
 ?>

+ 1
- 1
sections/torrents/edit.php View File

92
  * Commenting only to see it better.
92
  * Commenting only to see it better.
93
  */
93
  */
94
 
94
 
95
-View::show_header('Edit torrent', 'upload,torrent,bbcode');
95
+View::show_header('Edit torrent', 'upload,torrent');
96
 $TorrentForm = new TorrentForm(
96
 $TorrentForm = new TorrentForm(
97
     $Torrent = $Properties,
97
     $Torrent = $Properties,
98
     $Error = $Err,
98
     $Error = $Err,

+ 1
- 1
sections/torrents/editgroup.php View File

70
 
70
 
71
 View::show_header(
71
 View::show_header(
72
     'Edit torrent group',
72
     'Edit torrent group',
73
-    'upload,bbcode,vendor/easymde.min',
73
+    'upload,vendor/easymde.min',
74
     'vendor/easymde.min'
74
     'vendor/easymde.min'
75
 ); ?>
75
 ); ?>
76
 
76
 

+ 1
- 1
sections/upload/upload.php View File

14
 
14
 
15
 View::show_header(
15
 View::show_header(
16
     'Upload',
16
     'Upload',
17
-    'upload,bbcode,vendor/easymde.min',
17
+    'upload,vendor/easymde.min',
18
     'vendor/easymde.min'
18
     'vendor/easymde.min'
19
 );
19
 );
20
 
20
 

+ 1
- 1
sections/user/edit.php View File

69
  */
69
  */
70
 View::show_header(
70
 View::show_header(
71
     "$Username $ENV->CRUMB Settings",
71
     "$Username $ENV->CRUMB Settings",
72
-    'user,password_validate,validate,cssgallery,preview_paranoia,bbcode,user_settings,donor_titles,vendor/easymde.min',
72
+    'user,password_validate,validate,cssgallery,preview_paranoia,user_settings,vendor/easymde.min',
73
     'vendor/easymde.min'
73
     'vendor/easymde.min'
74
 );
74
 );
75
 
75
 

+ 1
- 1
sections/user/user.php View File

233
 
233
 
234
 View::show_header(
234
 View::show_header(
235
     $Username,
235
     $Username,
236
-    'vendor/imagesloaded.min,user,bbcode,requests,comments,info_paster,wall'
236
+    'vendor/imagesloaded.min,user,requests,comments,info_paster,wall'
237
 );
237
 );
238
 
238
 
239
 ?>
239
 ?>

+ 1
- 1
sections/userhistory/post_history.php View File

23
 $UserInfo = Users::user_info($UserID);
23
 $UserInfo = Users::user_info($UserID);
24
 extract(array_intersect_key($UserInfo, array_flip(array('Username', 'Enabled', 'Title', 'Avatar', 'Donor', 'Warned'))));
24
 extract(array_intersect_key($UserInfo, array_flip(array('Username', 'Enabled', 'Title', 'Avatar', 'Donor', 'Warned'))));
25
 
25
 
26
-View::show_header("Post history for $Username", 'subscriptions,comments,bbcode');
26
+View::show_header("Post history for $Username", 'subscriptions,comments');
27
 
27
 
28
 $ViewingOwn = ($UserID == $LoggedUser['ID']);
28
 $ViewingOwn = ($UserID == $LoggedUser['ID']);
29
 $ShowUnread = ($ViewingOwn && (!isset($_GET['showunread']) || !!$_GET['showunread']));
29
 $ShowUnread = ($ViewingOwn && (!isset($_GET['showunread']) || !!$_GET['showunread']));

+ 1
- 1
sections/userhistory/subscriptions.php View File

12
 }
12
 }
13
 list($Page, $Limit) = Format::page_limit($PerPage);
13
 list($Page, $Limit) = Format::page_limit($PerPage);
14
 
14
 
15
-View::show_header('Subscriptions', 'subscriptions,bbcode');
15
+View::show_header('Subscriptions', 'subscriptions');
16
 
16
 
17
 $ShowUnread = (!isset($_GET['showunread']) && !isset($HeavyInfo['SubscriptionsUnread']) || isset($HeavyInfo['SubscriptionsUnread']) && !!$HeavyInfo['SubscriptionsUnread'] || isset($_GET['showunread']) && !!$_GET['showunread']);
17
 $ShowUnread = (!isset($_GET['showunread']) && !isset($HeavyInfo['SubscriptionsUnread']) || isset($HeavyInfo['SubscriptionsUnread']) && !!$HeavyInfo['SubscriptionsUnread'] || isset($_GET['showunread']) && !!$_GET['showunread']);
18
 $ShowCollapsed = (!isset($_GET['collapse']) && !isset($HeavyInfo['SubscriptionsCollapse']) || isset($HeavyInfo['SubscriptionsCollapse']) && !!$HeavyInfo['SubscriptionsCollapse'] || isset($_GET['collapse']) && !!$_GET['collapse']);
18
 $ShowCollapsed = (!isset($_GET['collapse']) && !isset($HeavyInfo['SubscriptionsCollapse']) || isset($HeavyInfo['SubscriptionsCollapse']) && !!$HeavyInfo['SubscriptionsCollapse'] || isset($_GET['collapse']) && !!$_GET['collapse']);

+ 1
- 1
sections/wiki/article.php View File

49
 $TextBody = Text::full_format($Body, false);
49
 $TextBody = Text::full_format($Body, false);
50
 $TOC = Text::parse_toc(0);
50
 $TOC = Text::parse_toc(0);
51
 
51
 
52
-View::show_header($Title, 'wiki,bbcode');
52
+View::show_header($Title, 'wiki');
53
 ?>
53
 ?>
54
 
54
 
55
 <div>
55
 <div>

+ 1
- 1
sections/wiki/create.php View File

3
 
3
 
4
 View::show_header(
4
 View::show_header(
5
     'Create an article',
5
     'Create an article',
6
-    'bbcode,vendor/easymde.min',
6
+    'vendor/easymde.min',
7
     'vendor/easymde.min'
7
     'vendor/easymde.min'
8
 );
8
 );
9
 ?>
9
 ?>

+ 1
- 1
sections/wiki/edit.php View File

15
 
15
 
16
 View::show_header(
16
 View::show_header(
17
     'Edit '.$Title,
17
     'Edit '.$Title,
18
-    'bbcode,vendor/easymde.min',
18
+    'vendor/easymde.min',
19
     'vendor/easymde.min'
19
     'vendor/easymde.min'
20
 );
20
 );
21
 ?>
21
 ?>

+ 0
- 142
static/functions/bbcode.js View File

1
-/**
2
- * BBSpoiler
3
- */
4
-function BBSpoiler(link) {
5
-  if ($(link.nextSibling).has_class('hidden')) {
6
-    $(link.nextSibling).gshow();
7
-    $(link).html('Hide');
8
-
9
-    if ($(link).attr("value")) {
10
-      $(link).attr("value", "Hide" + $(link).attr("value").substring(4))
11
-    }
12
-  } else {
13
-    $(link.nextSibling).ghide();
14
-    $(link).html('Show');
15
-
16
-    if ($(link).attr("value")) {
17
-      $(link).attr("value", "Show" + $(link).attr("value").substring(4))
18
-    }
19
-  }
20
-}
21
-
22
-/**
23
- * wrapSelected
24
- */
25
-function wrapSelected(box, wrap, offset) {
26
-  if (!Array.isArray(wrap)) wrap = [wrap, wrap]
27
-  if (wrap.length < 2) wrap[1] = wrap[0]
28
-
29
-  var s = box.selectionStart
30
-  var e = box.selectionEnd
31
-  var v = box.value
32
-
33
-  box.value = v.slice(0, s) + wrap[0] + v.slice(s, e) + wrap[1] + v.slice(e)
34
-  box.focus()
35
-  box.selectionEnd = (offset !== undefined ? s + offset : e + wrap[0].length)
36
-}
37
-
38
-/**
39
- * EmojiBox
40
- */
41
-function EmojiBox(box) {
42
-  /*
43
-  let opened = false
44
-  let emojis = ['😀', '😁', '😂', '🤣', '😃', '😄', '😅', '😆', '😉', '😊', '😋', '😎', '😍', '😘', '😗', '😙', '😚', '🙂', '🤗', '🤔', '😐', '😑', '😶', '🙄', '😏', '😣', '😥', '😮', '🤐', '😯', '😪', '😫', '😴', '😌', '😛', '😜', '😝', '🤤', '😒', '😓', '😔', '😕', '🙃', '🤑', '😲', '🙁', '😖', '😞', '😟', '😤', '😢', '😭', '😦', '😧', '😨', '😩', '😬', '😰', '😱', '😳', '😵', '😡', '😠', '😷', '🤒', '🤕', '🤢', '🤧', '😇', '🤠', '🤡', '🤥', '🤓', '\n', '😈', '👿', '👹', '👺', '💀', '👻', '👽', '🤖', '💩', '😺', '😸', '😹', '😻', '😼', '😽', '🙀', '😿', '😾', '\n', '🍇', '🍈', '🍉', '🍊', '🍋', '🍌', '🍍', '🍎', '🍏', '🍐', '🍑', '🍒', '🍓', '🥝', '🍅', '🥑', '🍆', '🥔', '🥕', '🌽', '🌶', '🥒', '🍄', '🥜', '🌰', '🍞', '🥐', '🥖', '🥞', '🧀', '🍖', '🍗', '🥓', '🍔', '🍟', '🍕', '🌭', '🌮', '🌯', '🍳', '🍲', '🥗', '🍿', '🍱', '🍘', '🍙', '🍚', '🍛', '🍜', '🍝', '🍠', '🍢', '🍣', '🍤', '🍥', '🍡', '🍦', '🍧', '🍨', '🍩', '🍪', '🎂', '🍰', '🍫', '🍬', '🍭', '🍮', '🍯', '🍼', '🥛', '🍵', '🍶', '🍾', '🍷', '🍸', '🍹', '🍺', '🍻', '🥂', '🥃', '🍽', '🍴', '🥄', '\n', '🛀', '🛌', '💌', '💣', '🕳', '🛍', '📿', '💎', '🔪', '🏺', '🗺', '💈', '🛢', '🛎', '⌛', '⏳', '⌚', '⏰', '⏱', '⏲', '🕰', '🌡', '⛱', '🎈', '🎉', '🎊', '🎎', '🎏', '🎐', '🎀', '🎁', '🔮', '🕹', '🖼', '📯', '🎙', '🎚', '🎛', '📻', '📱', '📲', '📞', '📟', '📠', '🔋', '🔌', '💻', '🖥', '🖨', '🖱', '🖲', '💽', '💾', '💿', '📀', '🎥', '🎞', '📽', '📺', '📷', '📸', '📹', '📼', '🔍', '🔎', '🕯', '💡', '🔦', '🏮', '📔', '📕', '📖', '📗', '📘', '📙', '📚', '📓', '📃', '📜', '📄', '📰', '🗞', '📑', '🔖', '🏷', '💰', '💴', '💵', '💶', '💷', '💸', '💳', '📧', '📨', '📩', '📤', '📥', '📦', '📫', '📪', '📬', '📭', '📮', '🗳', '🖋', '🖊', '🖌', '🖍', '📝', '📁', '📂', '🗂', '📅', '📆', '🗒', '🗓', '📇', '📈', '📉', '📊', '📋', '📌', '📍', '📎', '🖇', '📏', '📐', '🗃', '🗄', '🗑', '🔒', '🔓', '🔏', '🔐', '🔑', '🗝', '🔨', '⛏', '🛠', '🗡', '🔫', '🛡', '🔧', '🔩', '🗜', '🔗', '⛓', '🔬', '🔭', '📡', '💉', '💊', '🚪', '🛏', '🛋', '🚽', '🚿', '🛁', '🚬', '🗿', '🚰', '\n', '💪', '👈', '👉', '👆', '🖕', '👇', '🤞', '🖖', '🤘', '🖐', '✋', '👌', '👍', '👎', '✊', '👊', '🤛', '🤜', '🤚', '👋', '👏', '👐', '🙌', '🙏', '🤝']
45
-  let ebox = document.createElement('div')
46
-  ebox.className = 'emoji_box border'
47
-
48
-  for (let emoji of emojis) {
49
-    if (emoji === '\n') {
50
-      let br = document.createElement('br')
51
-      ebox.appendChild(br)
52
-      continue;
53
-    }
54
-
55
-    let a = document.createElement('a')
56
-    a.innerHTML = emoji
57
-    a.addEventListener('click', e => {
58
-      wrapSelected(box, [emoji, ''])
59
-      e.stopPropagation()
60
-    })
61
-    ebox.appendChild(a)
62
-  }
63
-
64
-  return event => {
65
-    if (!opened) {
66
-      event.target.parentElement.appendChild(ebox)
67
-
68
-      let f = e => {
69
-        event.target.nextSibling.remove()
70
-        opened = false
71
-        document.removeEventListener('click', f)
72
-      }
73
-
74
-      window.setTimeout(_ => document.addEventListener('click', f), 1)
75
-      opened = true
76
-    }
77
-  }
78
-  */
79
-}
80
-
81
-/**
82
- * BBEditor
83
- */
84
-function BBEditor(box) {
85
-  /*
86
-  // todo: Integrate BioJS functions here
87
-  if (box.previousSibling && box.previousSibling.className == 'bbcode_bar') return
88
-
89
-  let buttons = [
90
-    { short: 'B', name: 'Bold', wrap: ['[b]', '[/b]'] },
91
-    { short: 'I', name: 'Italic', wrap: ['[i]', '[/i]'] },
92
-    { short: 'U', name: 'Underline', wrap: ['[u]', '[/u]'] },
93
-    { short: 'S', name: 'Strikethrough', wrap: ['[s]', '[/s]'] },
94
-    { short: 'Left', name: 'Align Left', wrap: ['[align=left]', '[/align]'] },
95
-    { short: 'Center', name: 'Align Center', wrap: ['[align=center]', '[/align]'] },
96
-    { short: 'Right', name: 'Align Right', wrap: ['[align=right]', '[/align]'] },
97
-    { short: 'Pre', name: 'Preformatted', wrap: ['[pre]', '[/pre]'] },
98
-    { short: 'H1', name: 'Subheading 1', wrap: '==' },
99
-    { short: 'H2', name: 'Subheading 2', wrap: '===' },
100
-    { short: 'H3', name: 'Subheading 3', wrap: '====' },
101
-    { short: 'Color', name: 'Color', wrap: ['[color=]', '[/color]'], offset: 7 },
102
-    { short: 'TeX', name: 'LaTeX', wrap: ['[tex]', '[/tex]'] },
103
-    { short: 'Quote', name: 'Quote', wrap: ['[quote]', '[/quote]'] },
104
-    { short: 'List', name: 'List', wrap: ['[*]', ''] },
105
-    { short: 'Hide', name: 'Spoiler', wrap: ['[spoiler]', '[/spoiler]'] },
106
-    { short: 'Img', name: 'Image', wrap: ['[img]', '[/img]'] },
107
-    { short: 'Vid', name: 'Video', wrap: ['[embed]', '[/embed]'] },
108
-    { short: 'Link', name: 'Link', wrap: ['[url]', '[/url]'] },
109
-    { short: 'Torr', name: 'Torrent', wrap: ['[torrent]', '[/torrent]'] },
110
-    { short: '😃', name: 'Emoji', func: EmojiBox(box) }
111
-  ]
112
-
113
-  let bar = document.createElement('ul')
114
-  bar.className = "bbcode_bar"
115
-  bar.style.width = box.offsetWidth + 'px'
116
-
117
-  // Let the DOM update and then snap the size again (twice)
118
-  setTimeout(function () {
119
-    bar.style.width = box.offsetWidth + 'px'
120
-    bar.style.width = box.offsetWidth + 'px'
121
-  }, 1)
122
-
123
-  for (let button of buttons) {
124
-    li = document.createElement('li')
125
-    b = document.createElement('a')
126
-    b.setAttribute('title', button.name)
127
-    b.innerHTML = button.short
128
-
129
-    if (button.wrap) b.addEventListener('click', e => wrapSelected(box, button.wrap, button.offset))
130
-    else if (button.func) b.addEventListener('click', button.func)
131
-
132
-    li.appendChild(b)
133
-    bar.appendChild(li)
134
-  }
135
-  box.parentNode.insertBefore(bar, box)
136
-  */
137
-}
138
-
139
-$(function () {
140
-  $('.bbcode_editor').each((i, el) => BBEditor(el))
141
-  $(document).on('click', '.spoilerButton', e => BBSpoiler(e.target))
142
-})

+ 0
- 33
static/functions/donor_titles.js View File

1
-$(document).ready(function() {
2
-  if ($('#donor_title_prefix_preview').length === 0) {
3
-    return;
4
-  }
5
-  $('#donor_title_prefix_preview').text($('#donor_title_prefix').val().trim() + ' ');
6
-  $('#donor_title_suffix_preview').text(' ' + $('#donor_title_suffix').val().trim());
7
-
8
-  if ($('#donor_title_comma').attr('checked')) {
9
-    $('#donor_title_comma_preview').text('');
10
-  } else {
11
-    $('#donor_title_comma_preview').text(', ');
12
-  }
13
-
14
-  $('#donor_title_prefix').keyup(function() {
15
-    if ($(this).val().length <= 30) {
16
-      $('#donor_title_prefix_preview').text($(this).val().trim() + ' ');
17
-    }
18
-  });
19
-
20
-  $('#donor_title_suffix').keyup(function() {
21
-    if ($(this).val().length <= 30) {
22
-      $('#donor_title_suffix_preview').text(' ' + $(this).val().trim());
23
-    }
24
-  });
25
-
26
-  $('#donor_title_comma').change(function() {
27
-    if ($(this).attr('checked')) {
28
-      $('#donor_title_comma_preview').text('');
29
-    } else {
30
-      $('#donor_title_comma_preview').text(', ');
31
-    }
32
-  });
33
-});

Loading…
Cancel
Save