Twitter userscript affects pages other than the intended (@included) ones?

Twitter userscript affects pages other than the intended (@included) ones?

By : cxt
Date : November 19 2020, 03:59 PM
hope this fix your issue The below UserScript is meant to work on my own twitter profile page (not the timeline). , A few things seem to be going on:
code :
// ==UserScript==
// @name            Twitter: Modify tweets on select pages.
// @include         https://twitter.com/*
// @require         http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @require         https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant           GM_addStyle
// @noframes
// ==/UserScript==
var tweetSelector = "p.js-tweet-text";

function fireMainCode () {
    /*--- Only fire on desired pages. This fires on:
    if (/^\/IJNanayakkara(\/status\/)?/.test (location.pathname) ) {
        if ( ! this.WFKE_fired) {
            waitForKeyElements (tweetSelector, prependToTweet);
            this.WFKE_fired = true;
    else {
        //--- Undesired page, shut off waitForKeyElements
        if (this.WFKE_fired) {
            this.WFKE_fired = null;
            var controlObj      = waitForKeyElements.controlObj  ||  {};
            var controlKey      = tweetSelector.replace (/[^\w]/g, "_");
            var timeControl     = controlObj [controlKey];
            if (timeControl) {
                clearInterval (timeControl);
                delete controlObj [controlKey]
fireMainCode ();

function prependToTweet (jNode) {
    var altDoneFlag = jNode.attr ("data-altdoneflag");
    if ( ! altDoneFlag) {
        jNode.prepend ("XXXXX => ")
        .attr ("data-altdoneflag", "yes");

/*--- Twitter uses some pretty screwy AJAX to "change" pages, but it at least
    changes the title. So listen for that to (re) trigger waitForKeyElements.
var myObserver  = new MutationObserver (titleChangeDetector);
var obsConfig   = {
    //-- Subtree needed.
    childList: true, characterData: true, subtree: true

myObserver.observe (document, obsConfig);

function titleChangeDetector (mutationRecords) {
    mutationRecords.forEach ( function (mutation) {
        //-- Sensible, Firefox
        if (    mutation.type                       == "childList"
            &&  mutation.target.nodeName            == "TITLE"
        ) {
            fireMainCode ();
        //-- WTF, Chrome
        else if (mutation.type                      == "characterData"
            &&  mutation.target.parentNode.nodeName == "TITLE"
        ) {
            fireMainCode ();
    } );

Share : facebook icon twitter icon
ON DELETE trigger in SQL Server 2008 affects more rows than intended

ON DELETE trigger in SQL Server 2008 affects more rows than intended

By : Konstantinos Takakis
Date : March 29 2020, 07:55 AM
This might help you I think you need to use both the objectid and userid columns with joins and not with IN operator.
Also, I don't see why aspnet_Users should be added:
code :
        objectid = -1, lat = -1, lng = -1, location = null 
        dbo.Job as j 
        dbo.Plan as p   on  p.planid = j.planid
        deleted as d    on  d.objectid = j.objectid
                        and d.user_id = p.userid ;
Function affects exactly half of intended elements

Function affects exactly half of intended elements

By : Rktf Farm
Date : March 29 2020, 07:55 AM
hope this fix your issue document.getElementsByClassName() returns an HTMLCollection, which is a "live" collection.
This means, as you .removeClass(), elements will be removed from h2s. So, incrementing h seems to jump 2 elements -- 1 for the increment itself and 1 because the removal caused a shift in indexes from h to length - 1.
code :
var h2s = document.getElementsByClassName("unformatprice");
h2s = Array.prototype.slice.call(h2s, 0);
for (var h = h2s.length - 1; h >= 0; h--) {
   // ...
CSS: Style affects tag outside intended selector

CSS: Style affects tag outside intended selector

By : volderman
Date : March 29 2020, 07:55 AM
help you fix your problem It should be like this. .cv-section h1 will affect all h1 inside the div cv-section but when you separate it with comma you are defining a new rule.
code :
.cv-section h1,
.cv-section h2,
.cv-section h3,
.cv-section h4,
.cv-section h5 {
    text-align: left;
    color: red; 
UINavigationBar appearance tint color affects system windows, bug or intended?

UINavigationBar appearance tint color affects system windows, bug or intended?

By : Veciti Krivac
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Why not simply Subclass UINavigationController and set the appearance proxy like so?
code :
UINavigationBar.appearance(whenContainedInInstancesOf: [YourUINavigationControllerSubclass.self]).barTintColor = UIColor.green
Include all pages in tampermonkey(userscript)

Include all pages in tampermonkey(userscript)

By : Nono Gour
Date : March 29 2020, 07:55 AM
seems to work fine I have to include all sites in tampermonkey..this is the script that i have to run
Related Posts Related Posts :
  • Do the action when the DIV comes in the display area of the browser with jQuery
  • jQuery slideshow overlapping CSS ribbon
  • JQuery animate function dont work
  • problems charts jquery highcharts
  • How to reset the select box values in Jquery sumoselect Multi select plugin
  • css absolute position on top of another element
  • How use jQuery String variable in html body
  • Get a row from table in view on modal bootstrap using codeigniter
  • How to make the effect of a div that covers an other div when scrolling?
  • Data binding using a button
  • How do i replace all dot in string to Underscore?
  • grab non-sibling element with jquery
  • Select a word and click it
  • Trigger modal instead redirect to /users/sign_in path, Rails 4 with devise
  • Combining Parent theme JS and CSS
  • Angular ui-grid - DropDown Selection shows Id
  • jquery addclass when there is content on body
  • JQUERY : CSS does not apply to dynamically created elements
  • Bootstrap multiselect dropdown checkbox not working on paginated table
  • JQuery scroll to dynamic id
  • Jquery first time tried ajax
  • Disable the link on the active tab (Bootstrap)
  • How to handle this validation when a div is added?
  • how to show/hide and check/uncheck checkboxes dynamically inside kendo grid
  • Conditional parameters for AJAX function
  • Jquery add class to input checkbox field
  • Bootstrap countdown timer Jquery
  • Open the closest modal of jQuery clicked element
  • change background color of specific button on click
  • Can I create link as post to 3rd party site and open in new tab?
  • ID is 'undefined' using .each()
  • Using .each() for targeting each child differently in Jquery
  • How to return data from functions in function
  • Execute this jquery only when viewport is bigger than
  • Bootbox showing white box behind dialog
  • Toggle multiple classes with prevAll(), nextAll(), slice(), and duplicate classes... better way?
  • Show/hide list items and add more/less link
  • Going through all occurences of class on slider change
  • Call jQuery valid() without updating the screen
  • hide and show ActionLink and save data in database - MVC
  • Pass each object in JSON array to query
  • Toggling content div on one-page site with jQuery
  • Foundation Equalizer is setting height to inherit?
  • carousel navigation each function
  • changing color of text color with input slider
  • jquery: filter using AND OR in selector
  • Call a function If any Item is chosen From select box , After Dom update
  • Target class within a jquery object
  • How to scroll a web page with fixed navigation bar just before arrive to a section or div?
  • How to add a class name to a specific selector
  • How to prevent background scrolling
  • How can I disable previous/next in OwlCarousel2 if there aren't enough items to scroll?
  • How to pass products and quantities to ASP.NET MVC4 Web API from form submit
  • jQuery css3 attribute not working
  • WordPress One Page Style Menus Scrolling
  • jquery.unobtrusive-ajax.js is not capturing the Submit event
  • Uncaught SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin '' in a call to 'postMessage'
  • can't get correct checkbox value
  • jquery tooltipster plugin, hide all tips?
  • How to set 3 different colors at jQuery UI Slider
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org