Tessellated Intelligence System
레퍼런스 매뉴얼
음--
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
(this.disablePingToDefault = () => { | |
this.disablePingToDefault.interval = setInterval(() => { | |
if (this.disablePingToDefault.currentUrl !== location.href) { // Cached url is not equal to 'location.href', do the following: | |
if (this.disablePingToDefault.observer !== undefined) // If an observer which created at previous is exist, | |
this.disablePingToDefault.observer.disconnect(); // disconnect it. | |
else { // If it wasn't, | |
// Create new instance to detect insertion of the reply box. | |
this.disablePingToDefault.observer = new MutationObserver(() => { | |
let pingButton = document.querySelector('div[class*="mentionButton"]'); // Get ping switch in reply box. | |
if (pingButton !== null) pingButton.click(); // Click if it's not null. Then reply ping will be disable. |