লক্ষ্য করুন: প্রকাশ করার পর, পরিবর্তনগুলো দেখতে আপনাকে আপনার ব্রাউজারের ক্যাশে পরিষ্কার করার প্রয়োজন হতে পারে।

  • ফায়ারফক্স / সাফারি: পুনরায় লোড-এ ক্লিক করার সময় শিফট টিপে ধরে রাখুন, অথবা হয় Ctrl-F5 বা Ctrl-R টিপুন (ম্যাকে ⌘-R টিপুন)
  • গুগল ক্রোম: Ctrl-Shift-R (ম্যাকে ⌘-Shift-R) টিপুন
  • এজ: Ctrl ধরে রাখা অবস্থায় Refresh-এ ক্লিক করুন, অথবা Ctrl-F5 টিপুন।
  • অপেরা: Ctrl-F5 টিপুন।
function MyDialog( config ) {
    MyDialog.super.call( this, config );
}
OO.inheritClass( MyDialog, OO.ui.Dialog );
MyDialog.static.name = 'myDialog';
MyDialog.static.title = 'My Custom Dialog';
MyDialog.prototype.initialize = function () {
    MyDialog.super.prototype.initialize.call( this );
    var content = new OO.ui.PanelLayout( { padded: true } );
    content.$element.append( '<p>Dialog content goes here.</p>' );
    this.$body.append( content.$element );
};

// Instantiate the Dialog
var myDialog = new MyDialog( { size: 'medium' } );

// Create a WindowManager
var windowManager = new OO.ui.WindowManager();
$( document.body ).append( windowManager.$element );
windowManager.addWindows( [ myDialog ] );

// When the DOM is ready, add the portlet link
$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () {
    // Add the portlet link with a custom click event
    var portletLink = mw.util.addPortletLink(
        'p-personal',
        '#',
        'তথ্যসূত্র সম্প্রসারণ করুন',
        'my-custom-link'
    );

    // Attach the click event handler to the portlet link
    $( portletLink ).click( function ( e ) {
        e.preventDefault(); // Prevent the default action
        windowManager.openWindow( myDialog );
    });
});