javascript

  1. Kier

    Javascript debugging with PhpStorm and Google Chrome using your own Chrome profile

    This is a tutorial to get Javascript debugging working in PhpStorm with Chrome while using your own Chrome user profile. The goal here is for PhpStorm to open a Chrome window for debugging purposes using your own user profile, rather than an arbitrary one that doesn't have any of your open tabs...
  2. FoxSecrets

    XF 2.2 How to correctly read XF variable with Javascript

    I need to run a code according to the screen size. So I've put the JS inside XF var and if I "alert" or "console.log" I can see the variable, but when calling the variable in XF it returns nothing. How to correctly read the XF variable in this case? <xf:set...
  3. joelyuk

    Duplicate Editor - JavaScript Error on Smileys/Media/GIPHY

    Hey, We've noticed that we are getting a JavaScript error whenever a smiley/media/giphy is inserted into the post after selecting one, resulting in the picker never closing. I've replicated this across several environments, themes, and also on demo forums created fresh on XenForo.com too...
  4. untuned

    XF 2.2 Mark user is_staff through rest API

    I would like to mark a user as staff through an external application, but upon sending the request the user gets returned without the is_staff field being updated. Here is the code that I am using to make said request: const params = new URLSearchParams(); params.append('is_staff', true) const...
  5. shivambhatele

    Java or Javascript?

    Hello Everyone, Can anyone suggest me which profile is better for a career point of view between java or javascript? I am a little bit confused to choose the right direction, I have asked these queries to lots of people but didn't find the best answer. Any developer to give me some suggestions?
  6. DEDinPALTO

    Not a bug A serious vulnerability related to the implementation of the code on js.

    Hi, recently, I found an XSS vulnerability on one of the Russian-language forums. After several hours of research, the following was clear: 1. The forum where this vulnerability was noticed did not filter href. Therefore, it was possible to substitute the following script...
  7. percity

    XF 2.2 add a text to editor?

    How can I programmatically active, focus and add a text or image to cuurent editor?
  8. biafraland

    XF 2.2 Display PDFs in List Format (plus JavaScript code placement)

    Hello, Is there any easy way to display pages with multiple PDF attachments in a list format instead of grid? I have attached a screenshot for this. Also, I want to place a JQuery-reliant Javascript code that must load only after JQuery has loaded. What's the right place to add this code...
  9. Kruzya

    Sometimes the day of week displays incorrectly for timezone settings

    Few notices: The default timezone for all users (include guests) on forum - GMT+3 (Moscow). I live in Izhevsk, where timezone - GMT+4 (Samara). On my PC in OS options, the timezone is GMT+4. On forum - GMT+3 (Moscow) for comfort performing moderator duties. Sometimes in different parts of the...
  10. JoyFreak

    [JoyFreak] Disable Member Tooltip

    JoyFreak submitted a new resource: [JoyFreak] Disable Member Tooltip - Disable member tooltip the efficient way with this quick and easy guide. Read more about this resource...
  11. JoyFreak

    [JoyFreak] Disable Member Tooltip

    Live example: Gaming Forum Description This guide will run you through on how to disable member tooltip the efficient way without having to edit more than one template. Guide Go to Admin CP > Appearance > Templates > Search: helper_js_global Live example: Gaming Forum
  12. fahad ashraf

    XF 2.2 How i can call function xenforo2 scritp

    I write a script Call code : <script> parent.window.XF.MyCallBack(1, ''); </script> how i can call it ?? for example if i call i got error parent.window.XF.MyCallBack is not a function but on xenforo1 when i call it with XenForo it was working fine please let me know i am doing...
  13. Earl

    XF 2.1 need help to convert $.fn.MyApp=function() to XF.MyApp=function()

    I have this javascript code (function( $ ) { "use strict"; var methods = { init : function( options ) { var $root = $(this).find("> ul"); var settings = $.extend({ // Settings; here you can add parameters to menu animation: 'slide', //...
  14. Britney

    XF 2.1 Adding javascript to header CSS

    So I'm trying to add javascript to my header, but it does not seem to work. Is there a specific file that you need to place the javascript in or how does it work? I've tried searching, but the only answer I came up with was that it is suppose to work in PAGE_CONTAINER, but that is not the case...
  15. Jean-Baptiste

    XF 2.1 Problems extending JS class

    Hello, I would like to extend the member tooltip JS XF.MemberTooltip, but I can't get it working. Here is my code : !function($, window, document, _undefined) { "use strict"; XF.MemberTooltipGM = XF.extend(XF.MemberTooltip, { __backup: { 'init': '_init'...
  16. CMTV

    XF 2.1 Can't get preview element

    Hi! In general, I need to analyze the DOM every time it is changed and maybe add some classes to inserted elements. In particular, I am trying to get a preview element which appears after clicking on "Preview" button. After researching the code for some time I figured out that I need to listen...
  17. CMTV

    XF 2.1 Disabling all form elements

    Hi! I want to disable all inputs, selects, textareas in certain div inside form tag. It is important to note, that I am using <xf:numberboxrow and similar code to create form fields. How can I do this? Is the following code correct? this.$options.find(':input').prop('disabled', true);
  18. CMTV

    Lack of interest 'sorter.js' Improvements

    Hi! Sometimes you need to explicitly set a container for dragula. So, instead of this in sort.js: init: function () { this.dragula = dragula([this.$target[0]], { moves: XF.proxy(this, 'isMoveable'), accepts: XF.proxy(this, 'isValidTarget') }); }, I propse this: init...
  19. CMTV

    XF 2.1 Catch ajax form submit from JS

    Hi! I have a modal with simple form in it: <xf:if is="$isNew"> <xf:title>{{ phrase('CMTV_CB_add_param') }}</xf:title> <xf:else /> <xf:title>{{ phrase('CMTV_CB_edit_param') }}</xf:title> </xf:if> <xf:form action="{{ link('criteria-builder/params/validateParam') }}" class="block"...
  20. Alpha1

    XF 1.5 How to make a JS widget display in XF1?

    I would like to make this JavaScript widget display at the top of specific xenforo forums: <div class="ja-gadget-virtual-assistant-inline cleanslate"> <link rel="stylesheet" href="https://components.justanswer.com/css/ja-gadget-virtual-assistant-inline" /> <script type="text/javascript"...
Top Bottom