PageSourceSearch

https://flipbot.uberflip.com/plugins/fabl/uf-fabl.js

js uberflip.com collected 2026-10-01 08:40:42 UTC 1,790 bytes, 65 lines download raw bytes

1window.ufFablStories = (function(){
2
3    var serviceName = 'fabl';
4    var tagName     = 'itemType.fabl';
5
6    var log = function(msg){
7        console.log('ufFablStories > ' + msg);
8    };
9
10    var loadItem = function() {
11        //if we're in an item
12        var fablStoryUrl =  $('link[rel=canonical]').attr('href');
13        if(
14
15            Hubs.appInstance.pageType == 'item' &&
16            Hubs.appInstance.currentItemTags &&
17            Hubs.appInstance.currentItemTags.indexOf( tagName ) >= 0 &&
18            typeof fablStoryUrl !== undefined
19
20        ){
21            $('.main').addClass( serviceName );
22            var storyContainer = $("article.entry-wrapper"); //.html('').get(0);
23            log('calling embedStory with URL ' + fablStoryUrl);
24            Fabl.embedStory(
25                storyContainer, 
26                fablStoryUrl,
27                {
28                    notSenseOffsetTop: 65
29                });
30        }
31    };
32
33    var styleTiles = function() {
34        //find tiles
35        $('.tile.blogpost').each(function(){
36            if( $(this).attr('data-tags') && $(this).attr('data-tags').indexOf( tagName ) >= 0){
37                $(this).removeClass('blogpost').addClass('fabl').find('.item-link.view').html('View Story');
38            }
39        });
40    };
41
42    return {
43        loadItem: loadItem,
44        styleTiles: styleTiles,
45        log: log
46    };
47
48}());
49
50(function($, Hubs, undefined) {
51
52    /* apply fabl function */
53
54    //Hubs.Events.on("load",function(){
55        ufFablStories.loadItem();
56        ufFablStories.styleTiles();
57    //});
58    Hubs.Events.on("itemsLoaded", function(){
59        ufFablStories.styleTiles();
60    });
61    Hubs.Events.on("recoItemsLoaded", function(){
62        ufFablStories.styleTiles();
63    });
64
65}(window.jQuery, window.Hubs));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.