WF ToolBox Beta

When perma is present to offer his version for beta + classic editor and add the profile editor waze and much more

  1. // ==UserScript==
  2. // @name WF ToolBox Beta
  3. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYBBicLUdqBwAAAA1lJREFUWMPFl0tIVFEYx39nug46qE1DYoWU1KJAKZHEoEVRLhwXQUFGKG6CHpsy7KlEi/BJA7myxyKoGSKDAhfpwoIWQWJgQzNQQTZa9DJKKjTG0dPijDo6984cG6UPLsy9c875/8/3/oSUEl15FITuF8iBIQiNwOiY+u50QP5KKMoH9xZEWaH2kQgdAie9yPZukBHASLI4uqa2HBoPIBz2FAg0dyHrfRqgVjIBTdVwfg9iwQQKzyKDw4CN1GQKCtZC/yVEup04JnEEJibBdRj5+w+LKpnpEGpHuDLnkogjkHVo8cFjSXztQGTE+IVtvtqXChzg9x8oucCcG9tiHS44nCLCpApJItZLgsMKK45AvTd1h3MXw48bcO0IELZYZIN6H4yFYwicvI0kzWKDVDfTeVY51ZbDu8BXm4CEAQ13lRaElBJbFebBOAmXayDPBToJc0MulKyffX/wHPa1gdnlBDDlQxi9AesM5y6Guop/N8nerVC9E7xPTRQbgd4AGD1+pFWmexSEgRCsWaEHmGGH7IzZ99A36OyzNkOPH2kMDFkfGI5A8ZmojTWkugxuH1O/33yCTacgkeUGhsAIjSQ5Nc3chqYOHk1xL9/D5rNgXQGiGhoBY7qkLobcegLjYbj3LDk4qHKuH/kS9peq4mKtArjXpwc+s8Xp0AP3t0DncajZsXgaczrAyM+Bwa+JF77ywMbV0eoqAd16sSyx/+TngKjzSul5aL7AbsBrj2q3puXnuLKzjnz8Adsuqmgyk7oKMMq3IDxd5rmgsnQuOKg4j431RJK7HHYXQLffvHUrL0IkTsUTcP807C2Z/dQ/CG+/aDSbAj58h1O3oqawSsUAJ8rhSo95DtjXBt5aqNquPnX0ws3Hui5uDg5wwh1TDZsOICxruB2qr8D1KOjn0eihOo+w7pwbK9W/My1ZSxfy/J0EPUEEnNkw+sv6VrpNavNBOLdnHoGZTvgDSyoFeRBondXNHALjE5B7FPnrfzWl6Wnwrh2Rlb404KF2NRuYNqXToeHKhC9XEYV5SfL+QgaTPHXz+TMBZi4ngIw0eNmKaD6YuMNNKhHlcIFWpXbxL8PpWBgaOhc2nApD5ZaUh9O4Fi0A3X7kiyF4N388z4GideAuQpQV6CvpLyjrNaUqOdRiAAAAAElFTkSuQmCC
  4. // @namespace WFTB_ns
  5. // @version 0.2.6
  6. // @description When perma is present to offer his version for beta + classic editor and add the profile editor waze and much more
  7. // @description:fr Quand un perma est présent proposer sa version pour l'éditeur beta + classique et ajout du editor profile waze et bien plus encore
  8. // @author exolium
  9. // @match http://*.waze.com/nex-forum/*
  10. // @match https://*.waze.com/new-forum/*
  11. // @match http://*.waze.com/forum/*
  12. // @match https://*.waze.com/forum/*
  13. // @match http://waze.com/nex-forum/*
  14. // @match https://waze.com/new-forum/*
  15. // @match http://waze.com/forum/*
  16. // @match https://waze.com/forum/*
  17. // @exclude http://*.waze.com/*user/*
  18. // @exclude https://*.waze.com/*user/*
  19. // @exclude http://waze.com/*user/*
  20. // @exclude https://waze.com/*user/*
  21. // @exclude https://www.waze.com/forum/ucp.php?i=164
  22. // @require https://gf.qytechs.cn/scripts/416773-wf-toolbox-lib-i18n-label/code/WF%20ToolBox%20Lib%20i18n%20Label.js
  23. // @require https://gf.qytechs.cn/scripts/416771-wf-toolbox-lib-beta/code/WF%20ToolBox%20Lib%20Beta.js
  24. // @copyright 2015-2021 exolium
  25. // @licence GNU GPL v2
  26. // @license GNU GPL v2
  27. // @grant GM_xmlhttpRequest
  28. // ==/UserScript==
  29.  
  30. /* **************************************************************************** *
  31. * Info version : Alpha release : 0.0.1.1, 0.1.1.1, 1.1.2.1,...
  32. * Info version : Beta release : 0.0.1 , 0.2.1 , 1.1.1 ,...
  33. * Info version : Production release : 1.0 , 1.1 , 2.0 ,...
  34. * **************************************************************************** *
  35. * Thanks to beta tester and script developer who bring innovative ideas to me
  36. * myriades, sebiseba, d2, laurenthembord, laurenthembprd,....
  37. * **************************************************************************** */
  38.  
  39. /* **************************************************************************** *
  40. * Release note :
  41. * - 0.0.4.0 Start externalisation of generic vars & fonction
  42. * - 0.0.3.13 fix perma beta <> prod
  43. * - 0.0.3 Fixed chrome crash + fixed if link and no pseudo (patch before final release)
  44. * - 0.0.2 update Waze Editor Profil, add settings manager (not functional but the interface opens)
  45. * - 0.0.1 Start with restaure another script, add Waze Editor Profil
  46. */
  47.  
  48. WFTB_lang=WFTB_lang_fr;
  49.  
  50. //============================== WFTB_Initialise =======================//
  51. function WFTB_Initialise() {
  52. WFTB_Log('WFTB_Initialise', 4, 'Start');
  53.  
  54. /**/
  55. if(typeof localStorage.user === 'undefined'){
  56. WFTB_Log('WFTB_Initialise', 5, 'Initialise localstorage WFTB_data');
  57. } else WFTB_profil = JSON.parse(localStorage.user);
  58.  
  59. if(typeof localStorage.WFTB_data === 'undefined') {
  60. localStorage.setItem('WFTB_data', '{"app_name":"' + GM_info.script.name + '", "version":"' + GM_info.script.version + '","lang":"' + navigator.language + '"}');
  61.  
  62. WFTB_Log('WFTB_Initialise', 5, 'Initialise localstorage WFTB_data');
  63. }
  64. else WFTB_Log('WFTB_Initialise', 5, 'localstorage WFTB_data already exist... Restaure Settings');
  65. WFTB_Log('WFTB_Initialise', 5, 'WFTB_data.length=' + localStorage.WFTB_data.length);
  66.  
  67.  
  68. /**/
  69. WFTB_Settings = JSON.parse(localStorage.WFTB_data);
  70. WFTB_checkupdate();
  71.  
  72. WFTB_Log('WFTB_Initialise', 5, 'WFTB_data.length=' + typeof localStorage.WFTB_data);
  73. WFTB_Log('WFTB_Initialise', 5, 'WFTB_data app_name ' + WFTB_Settings.app_name);
  74. WFTB_Log('WFTB_Initialise', 5, 'app_version ' + WFTB_Settings.version);
  75. WFTB_Log('WFTB_Initialise', 5, 'lang localstorage ' + WFTB_Settings.lang);
  76.  
  77. if(WFTB_profil.login) WFTB_Log('WFTB_Initialise', 5, 'username : ' + WFTB_profil.message);
  78. else WFTB_Log('WFTB_Initialise', 'warn', 'username : Anonymous');
  79.  
  80. //
  81. WFTB_is_beta_editor();
  82. WFTB_AddUserProfil();
  83. WFTB_settings();
  84. WFTB_version();
  85. WFTB_add_bbcode16_with_perma();
  86.  
  87. WFTB_Log('WFTB_Initialise', 4, 'End');
  88. }
  89.  
  90. //============================== WFTB_updatePerma ======================//
  91. function WFTB_updatePerma() {
  92. WFTB_Log('WFTB_updatePerma', 4, 'Start');
  93.  
  94. var WFTB_L_postlinkList = document.getElementsByClassName("postlink");
  95. var WFTB_L_WME_links = [];
  96. var WFTB_L_href = '';
  97. var WFTB_L_text = '';
  98. var WFTB_L_newURL = '';
  99. var WFTB_L_title = '';
  100. var WFTB_L_cpt = 0;
  101. var WFTB_L_patt_editor = new RegExp('\/editor\/?');
  102. var WFTB_L_patt_user = new RegExp('\/user\/editor\/');
  103. var WFTB_L_patt_wazeurl = new RegExp('http(|s)\:\/\/((editor-|)beta|www)\.waze\.com');
  104.  
  105. // Extraire les permas
  106. for(WFTB_L_cpt = 0; WFTB_L_cpt < WFTB_L_postlinkList.length; WFTB_L_cpt++) {
  107. WFTB_Log('WFTB_updatePerma', 5, 'Perma : '+WFTB_L_postlinkList[WFTB_L_cpt]);
  108. WFTB_L_postlinkList[WFTB_L_cpt].href = WFTB_L_postlinkList[WFTB_L_cpt].href.replace('https\:\/\/waze.com', 'https\:\/\/www.waze.com');
  109.  
  110. // modification http(s)://waze.com en http(s)://www.waze.com
  111. WFTB_L_postlinkList[WFTB_L_cpt].innerHTML = WFTB_L_postlinkList[WFTB_L_cpt].innerHTML.replace('https\:\/\/waze.com', 'https\:\/\/www.waze.com');
  112. WFTB_L_href = WFTB_L_postlinkList[WFTB_L_cpt].getAttribute('href');
  113.  
  114. // suite
  115. if(WFTB_targetblank) WFTB_L_postlinkList[WFTB_L_cpt].setAttribute('target', '_blank');
  116. if(!WFTB_L_patt_editor.test(WFTB_L_href) || WFTB_L_patt_user.test(WFTB_L_href) || !WFTB_L_patt_wazeurl.test(WFTB_L_href) ) continue;
  117. WFTB_L_WME_links.push(WFTB_L_postlinkList[WFTB_L_cpt]);
  118. WFTB_Log('WFTB_updatePerma', 5, 'Extract Perma');
  119. WFTB_L_postlinkList[WFTB_L_cpt].href = WFTB_L_postlinkList[WFTB_L_cpt].href.replace('https\:\/\/editor-beta.waze.com', 'https\:\/\/beta.waze.com');
  120. WFTB_L_postlinkList[WFTB_L_cpt].innerHTML = WFTB_L_postlinkList[WFTB_L_cpt].innerHTML.replace('https\:\/\/editor-beta.waze.com', 'https\:\/\/beta.waze.com');
  121. }
  122.  
  123. // Traitrer les permas
  124. if(WFTB_beta_editor) {
  125. for(WFTB_L_cpt = 0; WFTB_L_cpt < WFTB_L_WME_links.length; WFTB_L_cpt++) {
  126. WFTB_L_href = WFTB_L_WME_links[WFTB_L_cpt].getAttribute('href');
  127. WFTB_L_patt_editor = new RegExp('www');
  128. WFTB_Log('WFTB_updatePerma', 5, 'Convert URL : ' + WFTB_L_WME_links[WFTB_L_cpt]);
  129.  
  130. // Préparer le permas
  131. if(WFTB_L_patt_editor.test(WFTB_L_href)) {
  132. WFTB_L_text = WFTB_button_beta;
  133. WFTB_L_title = WFTB_label_OiBE[WFTB_lang];
  134. WFTB_L_newURL = WFTB_L_href.replace(WFTB_L_patt_editor, 'beta');
  135. WFTB_Log('WFTB_updatePerma', 5, 'Convert to beta : ' + WFTB_L_newURL);
  136. } else {
  137. WFTB_L_text = WFTB_button_prod;
  138. WFTB_L_title = WFTB_label_OiPE[WFTB_lang];
  139. WFTB_L_newURL = WFTB_L_href.replace(/beta/, 'www');
  140. WFTB_Log('WFTB_updatePerma', 5, 'Convert to prod : ' + WFTB_L_newURL);
  141. }
  142.  
  143. // Installer le permas
  144. var WFTB_htmlA = document.createElement('a');
  145. WFTB_htmlA.href = WFTB_L_newURL;
  146. if(WFTB_targetblank) WFTB_htmlA.setAttribute('target', '_blank');
  147. WFTB_htmlA.setAttribute('title', WFTB_L_title);
  148. WFTB_htmlA.className = 'postlink';
  149. WFTB_htmlA.style.marginLeft = '5px';
  150. WFTB_htmlA.innerHTML = '(' + WFTB_L_text + ')';
  151. WFTB_Log('WFTB_updatePerma', 5, 'Add Perma');
  152. WFTB_insertAfter(WFTB_htmlA, WFTB_L_WME_links[WFTB_L_cpt]);
  153. WFTB_insertAfter(document.createTextNode(" "), WFTB_L_WME_links[WFTB_L_cpt]);
  154. }
  155. }
  156.  
  157. //WFTB_Log('WFTB_updatePerma', 4, ret );
  158.  
  159. WFTB_Log('WFTB_updatePerma', 4, 'End');
  160. }
  161.  
  162. //============================== Popup Settings Manager ========================//
  163. function WFTB_settings() {
  164. WFTB_Log('WFTB_Settings', 4, 'Start');
  165.  
  166. var WFTB_L_SettingsName = 'WF Toolbox Settings';
  167. var WFTB_L_text = WFTB_Settings.app_name + ' ' + WFTB_Settings.version + ' - ' + WFTB_label_setting_manager [WFTB_lang];
  168. var WFTB_L_title = WFTB_L_text + WFTB_help_oc_setting[WFTB_lang];
  169. var WFTB_L_sbm = document.createElement('div');
  170. var WFTB_L_sbm_title = document.createElement('div');
  171. var WFTB_L_sbm_content = document.createElement('div');
  172. var WFTB_L_sbm_footer = document.createElement('div');
  173. var WFTB_L_sbm_footer_a_close = document.createElement('a');
  174. var WFTB_L_sbm_open_link_tab = document.createElement('li');
  175. var WFTB_L_sbm_open_link_tab_a = document.createElement('a');
  176. var WFTB_L_sbm_open_link_tab_a_span = document.createElement('span');
  177. var WFTB_L_sbm_open_link_listlink = document.createElement('a');
  178. var WFTB_L_sbm_style = '';
  179. var WFTB_L_sbm_height = '80%';
  180. var WFTB_L_sbm_width = '80%';
  181. var WFTB_L_LinkList = '';
  182. var WFTB_L_setting_tab = document.createElement('table'); //wftb_settings_box_content
  183.  
  184. //
  185. WFTB_L_sbm.id = 'wftb_settings_box';
  186. WFTB_L_sbm.setAttribute('style','border: 2px solid #333;z-index: 10;');
  187. WFTB_L_sbm.style.display = 'none';
  188. WFTB_L_sbm.style.position = 'absolute';
  189. if(window.innerWidth > 960) WFTB_L_sbm.style.left = (window.innerWidth / 2 - 430) + 'px';
  190. else WFTB_L_sbm.style.left = '50px';
  191. WFTB_L_sbm.style.top = '150px';
  192. WFTB_L_sbm.style.height = '420px';
  193. WFTB_L_sbm.style.width = '860px';
  194. WFTB_L_sbm.style.textAlign = 'center';
  195. WFTB_L_sbm.style.backgroundColor = '#FFFFFF';
  196.  
  197. //
  198. WFTB_L_sbm_title.id = 'wftb_settings_title';
  199. WFTB_L_sbm_title.setAttribute('style','height: 20px; background-color: #0177b3; border-bottom: 1px solid #666; vertical-align: middle; font-weight: bold; font-size: 12px; line-height: 1.7;');
  200. WFTB_L_sbm_title.style.color = '#ffffff';
  201. WFTB_L_sbm_title.innerHTML = WFTB_L_text;
  202.  
  203. //
  204. WFTB_L_sbm_content.id = 'wftb_settings_box_content';
  205. WFTB_L_sbm_content.style.height = '378px';
  206. WFTB_L_sbm_content.style.backgroundColor = '#e1ebf2';
  207. WFTB_L_sbm_content.appendChild(document.createTextNode('Comming Sooooon ' + WFTB_version()));
  208. WFTB_L_sbm_content.appendChild(document.createElement('br'));
  209. WFTB_L_sbm_content.appendChild(document.createTextNode('Width : ' + window.innerWidth));
  210. WFTB_L_sbm_content.appendChild(document.createElement('br'));
  211. WFTB_L_sbm_content.appendChild(document.createTextNode('Height : ' + window.innerHeight));
  212.  
  213. //
  214. WFTB_L_sbm_footer.id = 'wftb_settings_box_footer';
  215. WFTB_L_sbm_footer.setAttribute('style','height: 20px; border-top: 1px solid #666; font-weight: bold; font-size: 12px; line-height: 1.7;');
  216. WFTB_L_sbm_footer.style.height = '20px';
  217. WFTB_L_sbm_footer.style.backgroundColor = 'rgb(126, 167, 187)';
  218.  
  219. //
  220. WFTB_L_sbm_footer_a_close.id='wftb_settings_close';
  221. WFTB_L_sbm_footer_a_close.setAttribute('accesskey','q');
  222. WFTB_L_sbm_footer_a_close.href = 'javascript:void(0)';
  223. WFTB_L_sbm_footer_a_close.title = WFTB_L_title;
  224. WFTB_L_sbm_footer_a_close.innerHTML = WFTB_label_close[WFTB_lang];
  225.  
  226. //
  227. WFTB_L_sbm_footer.appendChild(WFTB_L_sbm_footer_a_close);
  228.  
  229. //
  230. WFTB_L_sbm_open_link_listlink.id = 'wftb_settings_open_ll';
  231. WFTB_L_sbm_open_link_listlink.href = 'javascript:void(0)';
  232. WFTB_L_sbm_open_link_listlink.setAttribute('accesskey','w');
  233. WFTB_L_sbm_open_link_listlink.title = WFTB_L_title;
  234. WFTB_L_sbm_open_link_listlink.innerHTML = WFTB_L_SettingsName;
  235.  
  236. //
  237. WFTB_L_setting_tab.id = 'wftb_settings_box_tab';
  238. WFTB_L_setting_tab.id = 'wftb_settings_box_tab';
  239. WFTB_L_setting_tab.id = 'wftb_settings_box_tab';
  240. WFTB_L_setting_tab.id = 'wftb_settings_box_tab';
  241. WFTB_L_setting_tab.id = 'wftb_settings_box_tab';
  242. WFTB_L_setting_tab.id = 'wftb_settings_box_tab';
  243. WFTB_L_sbm_content.appendChild(WFTB_L_setting_tab);
  244. //
  245. WFTB_L_sbm.appendChild(WFTB_L_sbm_title);
  246. WFTB_L_sbm.appendChild(WFTB_L_sbm_content);
  247. WFTB_L_sbm.appendChild(WFTB_L_sbm_footer);
  248.  
  249. //
  250. WFTB_Log('WFTB_Settings', 5, '************************');
  251. WFTB_Log('WFTB_Settings', 5, document.getElementsByTagName('style')[0].innerHTML);
  252. WFTB_Log('WFTB_Settings', 5, '************************');
  253. document.getElementsByTagName('style')[0].innerHTML = document.getElementsByTagName('style')[0].innerHTML + WFTB_L_sbm_style;
  254. WFTB_Log('WFTB_Settings', 5, document.getElementsByTagName('style')[0].innerHTML);
  255. WFTB_Log('WFTB_Settings', 5, '************************');
  256.  
  257. //
  258. document.body.appendChild(WFTB_L_sbm);
  259.  
  260. //
  261. WFTB_L_sbm_open_link_tab_a.id = 'wftb_settings_open_lt';
  262. WFTB_L_sbm_open_link_tab_a.title = WFTB_L_title;
  263. WFTB_L_sbm_open_link_tab_a.href = 'javascript:void(0)';
  264.  
  265. //
  266. WFTB_L_sbm_open_link_tab_a_span.innerHTML = WFTB_L_SettingsName;
  267.  
  268. //
  269. WFTB_L_sbm_open_link_tab_a.appendChild(WFTB_L_sbm_open_link_tab_a_span);
  270. WFTB_L_sbm_open_link_tab.appendChild(WFTB_L_sbm_open_link_tab_a);
  271.  
  272. // Add "WF Toolbox Settings" link on tab to User Control Panel
  273. WFTB_Log('WFTB_Settings', 5, document.getElementById('tabs'));
  274. if(document.getElementById('tabs') !== null) document.getElementById('tabs').getElementsByTagName('ul')[0].appendChild(WFTB_L_sbm_open_link_tab);
  275.  
  276. // Search ListLink
  277. WFTB_L_LinkList = WFTB_xpath(WFTB_search_linklist, document);
  278. WFTB_Log('WFTB_Settings', 5, 'xpath linklist ' + WFTB_L_LinkList.length);
  279.  
  280. // Add "WF Toolbox Settings" link on linklist
  281. if(WFTB_L_LinkList.length == 1) {
  282. WFTB_L_LinkList[0].appendChild(document.createTextNode(" • "));
  283. WFTB_L_LinkList[0].appendChild(WFTB_L_sbm_open_link_listlink);
  284. }
  285.  
  286. // Add event onclic to "Close" link
  287. document.getElementById('wftb_settings_close').onclick = function() {
  288. document.getElementById('wftb_settings_box').style.display = 'none';
  289. };
  290.  
  291. // Add event onclic to "WF Toolbox Settings" link on tab to User Control Panel
  292. if(document.getElementById('tabs') !== null) {
  293. document.getElementById('wftb_settings_open_lt').onclick = function() {
  294. document.getElementById('wftb_settings_box').style.display = 'block';
  295. };
  296. }
  297.  
  298. // Add event onclic to "WF Toolbox Settings" link on Link List
  299. if(WFTB_L_LinkList.length == 1) {
  300. document.getElementById('wftb_settings_open_ll').onclick = function() {
  301. document.getElementById('wftb_settings_box').style.display = 'block';
  302. };
  303. }
  304. unsafeWindow.onkeyup = function(WFTB_L_evt) {
  305. WFTB_L_evt = WFTB_L_evt || window.event;
  306.  
  307. //
  308. if (WFTB_L_evt.keyCode == 27) {
  309. document.getElementById('wftb_settings_box').style.display = 'none';
  310. WFTB_Log('WFTB_Settings', 5, 'unsafeWindow.onkeyup : ' + WFTB_L_evt.keyCode + ' (Escape / Echap)');
  311. } else {
  312. WFTB_Log('WFTB_Settings', 5, 'unsafeWindow.onkeyup : ' + WFTB_L_evt.keyCode);
  313. }
  314. };
  315.  
  316. unsafeWindow.onkeypress = function(WFTB_L_evt) {
  317. WFTB_L_evt = WFTB_L_evt || window.event;
  318.  
  319. //
  320. if (WFTB_L_evt.keyCode == 27) {
  321. document.getElementById('wftb_settings_box').style.display = 'none';
  322. WFTB_Log('WFTB_Settings', 5, 'unsafeWindow.onkeypress : ' + WFTB_L_evt.keyCode + ' (Escape / Echap)');
  323. } else {
  324. WFTB_Log('WFTB_Settings', 5, 'unsafeWindow.onkeypress : ' + WFTB_L_evt.keyCode);
  325. }
  326. };
  327.  
  328. unsafeWindow.onresize = function() {
  329. WFTB_Log('WFTB_Settings', 5, 'onresize even');
  330. WFTB_settings_update();
  331. };
  332.  
  333. WFTB_Log('WFTB_Settings', 4, 'End');
  334. }
  335.  
  336. //============================== WFTB_add_bbcode16_with_perma ==========================//
  337. function WFTB_add_bbcode16_with_perma(){
  338. WFTB_Log('WFTB_add_bbcode16_with_perma', 4, 'Start');
  339. var WFTB_L_bbc16_w_perma = document.createElement('input');
  340. var WFTB_L_bbc16 = WFTB_xpath(WFTB_search_addperma, document);
  341.  
  342. if (bbtags[bbtags.length-1]!='[/url]') bbtags.push('[url=]','[/url]');
  343.  
  344. WFTB_Log('WFTB_add_bbcode16_with_perma', 4, 'WFTB_L_bbc16.length=' + WFTB_L_bbc16.length);
  345. if(WFTB_L_bbc16.length == 1) {
  346. WFTB_L_bbc16_w_perma.type = 'button';
  347. WFTB_L_bbc16_w_perma.className = 'button2';
  348. WFTB_L_bbc16_w_perma.name = 'addbbcode16_plus';
  349. WFTB_L_bbc16_w_perma.value = 'URL=';
  350. WFTB_L_bbc16_w_perma.style = 'text-decoration: underline; width: 40px';
  351. WFTB_L_bbc16_w_perma.onclick = function() {
  352. bbstyle(bbtags.length-2);
  353. };
  354.  
  355. WFTB_insertAfter(WFTB_L_bbc16_w_perma,WFTB_L_bbc16[0]);
  356. WFTB_insertAfter(document.createTextNode(" "),WFTB_L_bbc16[0]);
  357. }
  358. WFTB_Log('WFTB_add_bbcode16_with_perma', 4, 'End');
  359. }
  360.  
  361. //============================== WFTB_settings_update ==========================//
  362. function WFTB_settings_update() {
  363. var WFTB_L_sbm;
  364.  
  365. WFTB_Log('WFTB_settings_update', 4, 'Start');
  366.  
  367. WFTB_L_sbm = document.getElementById('wftb_settings_box');
  368. if(WFTB_L_sbm === null) return;
  369.  
  370. if(window.innerWidth > 960) WFTB_L_sbm.style.left = (window.innerWidth / 2 - 430) + 'px';
  371. else WFTB_L_sbm.style.left = '50px';
  372.  
  373. WFTB_Log('WFTB_settings_update', 4, 'End');
  374. }
  375.  
  376.  
  377. //============================== Start WFTB ============================//
  378. WFTB_Bootstrap();
  379. //============================== End ====================================//

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址